Zen Cart Logo
Forums / General Questions / Something broke after moving admin

Something broke after moving admin

Views: 960

Results 1 to 7 of 7
16 Oct 2012, 7:14 AM
#1
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Something broke after moving admin

I get: ```
ERROR: admin/includes/configure.php file not found. Suggest running zc_install/index.php?


The configure.php IS executed - I checked with "echo" - and the folders are correct. I do NOT, of course, have an admin-folder - it is renamed!
16 Oct 2012, 8:37 AM
#2
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Something broke after moving admin

but did you edit your configure.php files to suit your new admin folder name?

16 Oct 2012, 8:49 AM
#3
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Something broke after moving admin

Yes and it finds configure.php as I mentioned!

<?php
/**
 * @package Configuration Settings circa 1.5.0
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * File Built by zc_install on 2012-08-16 03:15:28
 */


/*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
/***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/

// Define the webserver and path parameters
  // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
  // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
  define('HTTP_SERVER', 'http://mysite.com/');
  define('HTTPS_SERVER', 'https://mysite.com/');
  define('HTTP_CATALOG_SERVER', 'http://mysite.com/');
  define('HTTPS_CATALOG_SERVER', 'https://mysite.com/');

  // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
  define('ENABLE_SSL_ADMIN', 'false');

  // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
  define('ENABLE_SSL_CATALOG', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];

  define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

  define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
  define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '"mysite physical"/public_html/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
  define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

An "echo" in this code is displayed before the error.

I have only moved the admin, not the site as a whole, as I need to test it first.

16 Oct 2012, 3:56 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Something broke after moving admin

kalastaja:

Yes and it finds configure.php as I mentioned!

<?php /** * @package Configuration Settings circa 1.5.0 * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * File Built by zc_install on 2012-08-16 03:15:28 */ /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // Define the webserver and path parameters // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com define('HTTP_SERVER', 'http://mysite.com/'); define('HTTPS_SERVER', 'https://mysite.com/'); define('HTTP_CATALOG_SERVER', 'http://mysite.com/'); define('HTTPS_CATALOG_SERVER', 'https://mysite.com/'); // secure webserver for admin? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_ADMIN', 'false'); // secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_CATALOG', 'false'); // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes! // * DIR_WS_* = Webserver directories (virtual/URL) // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder) $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path']; define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/'); define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/'); define('DIR_WS_PHPBB', '/'); // * DIR_FS_* = Filesystem directories (local/physical) define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/'); //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_CATALOG', '"mysite physical"/public_html/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/'); define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); ```That's not a complete file. Missing database info. And has some typos in it. > **kalastaja:** > > I have only moved the admin, not the site as a whole, as I need to test it first. The admin can't exist without the rest of the site's files. So, don't just move your admin folder someplace and assume it will work standalone.
16 Oct 2012, 7:36 PM
#5
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Something broke after moving admin

Ok, thanks. The reason was that I have some cron-executions to test and I'm not prepared to go public with the site. So I figured I'll start with admin, but I stand corrected! I left out the db-part as I assumed it was not relevant. The typos however would be greatly appreciated!

16 Oct 2012, 8:49 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Something broke after moving admin

The typos are in the ways you removed your real information from your post.
I can't give you any meaningful feedback when you don't provide the real info.

ie: this wouldn't work:```
define('DIR_FS_CATALOG', '"mysite physical"/public_html/');



As always, check your file for correct syntax.
17 Oct 2012, 2:12 AM
#7
kalastaja avatar

kalastaja

Zen Follower

Join Date:
Mar 2010
Location:
Finland
Posts:
465
Plugin Contributions:
0

Re: Something broke after moving admin

True, but that wasn't a typo - mysite.com doesn't exist either.... However I'll be more precise in the future!