Zen Cart Logo
Forums / General Questions / Failed move to root

Failed move to root

Views: 1,173

Results 1 to 18 of 18
22 Feb 2011, 2:09 PM
#1
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Failed move to root

Hi Guys,

I have not been successful in making the move to the root directory from /zencart/

Please can you help analyse my situation and put me right. I have followed all the tutorials and read thro other forum contributions. Last night I was able to recover to a backup copy but today I have lost Admin and the website!

:frusty:

I'm thinking as a newbie I should have called for help earlier! Here is a copy of the admin/includes/configure.php file and the includes/configure.php

With many thanks in anticipation.

admin/includes/configure.php

<?php /** * @package Configuration Settings circa 1.3.9 * @copyright Copyright 2003-2010 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 2011-02-03 01:02:35 */ /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // Define the webserver and path parameters // Main webserver: eg-http://www.your_domain.com - // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com /* * URLs for your site will be built via: * HTTP_SERVER plus DIR_WS_ADMIN or * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or * HTTP_SERVER plus DIR_WS_CATALOG or * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG * ...depending on your system configuration settings * * If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following: */ define('HTTP_SERVER', 'http://thesilkfactory.biz'); define('HTTPS_SERVER', 'https://thesilkfactory.biz'); define('HTTP_CATALOG_SERVER', 'http://thesilkfactory.biz'); define('HTTPS_CATALOG_SERVER', 'https://thesilkfactory.biz'); // Use secure webserver for catalog module and/or admin areas? define('ENABLE_SSL_CATALOG', 'false'); define('ENABLE_SSL_ADMIN', '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) define('DIR_WS_ADMIN', '/zencart/adminabc/'); define('DIR_WS_CATALOG', '/zencart/'); define('DIR_WS_HTTPS_ADMIN', '/zencart/adminabc/'); define('DIR_WS_HTTPS_CATALOG', '/zencart/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); 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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/'); // * DIR_FS_* = Filesystem directories (local/physical) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_ADMIN', '/home/content/39/xxxxxxx/html/zencart/adminurrhtcqq/'); define('DIR_FS_CATALOG', '/home/content/39/xxxxxxx/html/zencart/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); define('DB_SERVER', 'xxxxxxxxxxxxxxxxxx'); define('DB_SERVER_USERNAME', 'xxxxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxxxxx'); define('DB_DATABASE', 'xxxxxxxxxxxxxxxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/content/39/xxxxxxx/html/zencart/cache'); // EOF **includes/configure.php** <?php /** * @package Configuration Settings circa 1.3.9 * @copyright Copyright 2003-2010 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 2011-02-03 01:02:35 */ /*************** 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://thesilkfactory.biz'); define('HTTPS_SERVER', 'https://thesilkfactory.biz'); // Use secure webserver for checkout procedure? define('ENABLE_SSL', '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) define('DIR_WS_CATALOG', '/zencart/'); define('DIR_WS_HTTPS_CATALOG', '/zencart/'); 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) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_CATALOG', '/home/content/39/xxxxxxx/html/zencart/'); 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/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); define('DB_SERVER', 'xxxxxxxxx.com'); define('DB_SERVER_USERNAME', 'xxxxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxxxxx'); define('DB_DATABASE', 'xxxxxxxxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/content/39/xxxxxxxx/html/zencart/cache'); // EOF
22 Feb 2011, 2:51 PM
#2
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

Latest situation is that I have recovered access to Admin.

So far as the website is concerned I was previously getting a 404 error but but now it is an HTTP Error 500.

I'm trying to recover to the /zencart/ directory configuration, and then have another go at relocating to the root!

Thanks Guys.

22 Feb 2011, 3:18 PM
#3
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Failed move to root

The sections in red below would need to have the zencart removed from them if you are going to move up 1 level to root

admin/includes/configure.php

<?php /** * @package Configuration Settings circa 1.3.9 * @copyright Copyright 2003-2010 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 2011-02-03 01:02:35 */ /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // Define the webserver and path parameters // Main webserver: eg-http://www.your_domain.com - // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com /* * URLs for your site will be built via: * HTTP_SERVER plus DIR_WS_ADMIN or * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or * HTTP_SERVER plus DIR_WS_CATALOG or * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG * ...depending on your system configuration settings * * If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following: */ define('HTTP_SERVER', 'http://thesilkfactory.biz'); define('HTTPS_SERVER', 'https://thesilkfactory.biz'); define('HTTP_CATALOG_SERVER', 'http://thesilkfactory.biz'); define('HTTPS_CATALOG_SERVER', 'https://thesilkfactory.biz'); // Use secure webserver for catalog module and/or admin areas? define('ENABLE_SSL_CATALOG', 'false'); define('ENABLE_SSL_ADMIN', '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) define('DIR_WS_ADMIN', '/zencart/adminabc/'); define('DIR_WS_CATALOG', '/zencart/'); define('DIR_WS_HTTPS_ADMIN', '/zencart/adminabc/'); define('DIR_WS_HTTPS_CATALOG', '/zencart/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); 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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/'); // * DIR_FS_* = Filesystem directories (local/physical) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_ADMIN', '/home/content/39/xxxxxxx/html/zencart/adminurrhtcqq/'); define('DIR_FS_CATALOG', '/home/content/39/xxxxxxx/html/zencart/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); define('DB_SERVER', 'xxxxxxxxxxxxxxxxxx'); define('DB_SERVER_USERNAME', 'xxxxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxxxxx'); define('DB_DATABASE', 'xxxxxxxxxxxxxxxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/content/39/xxxxxxx/html/zencart/cache'); // EOF includes/configure.php <?php /** * @package Configuration Settings circa 1.3.9 * @copyright Copyright 2003-2010 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 2011-02-03 01:02:35 */ /*************** 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://thesilkfactory.biz'); define('HTTPS_SERVER', 'https://thesilkfactory.biz'); // Use secure webserver for checkout procedure? define('ENABLE_SSL', '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) define('DIR_WS_CATALOG', '/zencart/'); define('DIR_WS_HTTPS_CATALOG', '/zencart/'); 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) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_CATALOG', '/home/content/39/xxxxxxx/html/zencart/'); 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/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); define('DB_SERVER', 'xxxxxxxxx.com'); define('DB_SERVER_USERNAME', 'xxxxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxxxxx'); define('DB_DATABASE', 'xxxxxxxxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/content/39/xxxxxxxx/html/zencart/cache');
22 Feb 2011, 3:34 PM
#4
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

Hi barco57,

Thanks for the speedy response - much appreciated.

I think my problem lies elsewhere - just don't know how to diagnose it.

If I try again to edit the session directory and configure files I believe I will loose access to Admin again!

Can you assist with error logs etc?
P

22 Feb 2011, 4:04 PM
#5
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

Latest situation.

Here is a copy of the fix_cache_key report:

Execute($sql); //read database $zdb_sess_write_old = $result->fields['configuration_value']; echo 'Found SESSION_WRITE_DIRECTORY in database: '.$zdb_sess_write_old.'
'; if ($zdb_sql_cache == $zdb_sess_write_old && $force!=true) { echo '
No changes required.
Exiting.
'; } else { echo '
Now synchronizing...
'; //write database $sql = "update " . DB_PREFIX . "configuration set configuration_value = '" . $db->prepare_input(trim($zdb_sql_cache)) . "' where configuration_key = 'SESSION_WRITE_DIRECTORY'"; $db->Execute($sql); //re-read database $sql = "select configuration_value from " . DB_PREFIX . "configuration where configuration_key = 'SESSION_WRITE_DIRECTORY'"; $result=$db->Execute($sql); $zdb_sess_write_new = $result->fields['configuration_value']; echo 'Database now contains the following SESSION_WRITE_DIRECTORY: '.$zdb_sess_write_new.'
'; echo '
Finished.
'; } echo '

22 Feb 2011, 4:10 PM
#6
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Failed move to root

Where do have the site now? in root or in zencart folder?

22 Feb 2011, 4:16 PM
#7
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

It's in the zencart folder barco 57. Thanks for your interest :smile:

Here is a copy of the latest error log. Many like this:

[22-Feb-2011 09:05:15] PHP Warning: require(includes/counter.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/content/39/xxxxx/html/zencart/includes/application_top.php on line 158
[22-Feb-2011 09:05:15] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/counter.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/39/xxxxx/html/zencart/includes/application_top.php on line 158

22 Feb 2011, 4:40 PM
#8
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

OK so here is the latest. :smile:

The error log gave me a pointer to the includes/counter.php file

In all the shuffling about the counter.php file was not returned to the zencart/includes folder.!

I now have the site and Admin back up!! :D

Thanks barco57 for stepping in. Your involvement helped calm me down a bit.

Gonna have another go at moving to the root now. Deep breath. Hold nose - and jump!

P

22 Feb 2011, 6:04 PM
#9
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

DohHH! :lamo:

So I just tried once more to make the move to the root from /zencart/ after having recovered everything again.

Have once again lost access to Admin and the site. (I wonder if the Admin access is a timing thing? It seemed to come back of its own volition last time around although I can't be sure)

So this is what I did:

Made sure the config file permissions were correctly set.
Edited the sessions address to remove the /zencart/

Moved all zencart files and folders to the root

ftp'd down the config files and edited them before returning them to the host

HOWEVER, Each time I did this my filezilla error messaged:
'can't change directory to zencart/cache. No such file or directory. ftp failed to retrieve directory listing'

I'm guessing that this may be a pointer to the solution.

Would welcome your learned suggestions :wacko:

22 Feb 2011, 7:17 PM
#10
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

So with the zencart folders and files now in the root, here is a copy of the fix cache key I just ran: All seems OK?

Execute($sql); //read database $zdb_sess_write_old = $result->fields['configuration_value']; echo 'Found SESSION_WRITE_DIRECTORY in database: '.$zdb_sess_write_old.'
'; if ($zdb_sql_cache == $zdb_sess_write_old && $force!=true) { echo '
No changes required.
Exiting.
'; } else { echo '
Now synchronizing...
'; //write database $sql = "update " . DB_PREFIX . "configuration set configuration_value = '" . $db->prepare_input(trim($zdb_sql_cache)) . "' where configuration_key = 'SESSION_WRITE_DIRECTORY'"; $db->Execute($sql); //re-read database $sql = "select configuration_value from " . DB_PREFIX . "configuration where configuration_key = 'SESSION_WRITE_DIRECTORY'"; $result=$db->Execute($sql); $zdb_sess_write_new = $result->fields['configuration_value']; echo 'Database now contains the following SESSION_WRITE_DIRECTORY: '.$zdb_sess_write_new.'
'; echo '
Finished.
'; } echo '

22 Feb 2011, 7:33 PM
#11
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

And this is the admin/includes/configure.php as it is at the root now.

<?php /** * @package Configuration Settings circa 1.3.9 * @copyright Copyright 2003-2010 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 2011-02-03 01:02:35 */ /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // Define the webserver and path parameters // Main webserver: eg-http://www.your_domain.com - // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com /* * URLs for your site will be built via: * HTTP_SERVER plus DIR_WS_ADMIN or * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or * HTTP_SERVER plus DIR_WS_CATALOG or * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG * ...depending on your system configuration settings * * If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following: */ define('HTTP_SERVER', 'http://thesilkfactory.biz'); define('HTTPS_SERVER', 'https://thesilkfactory.biz'); define('HTTP_CATALOG_SERVER', 'http://thesilkfactory.biz'); define('HTTPS_CATALOG_SERVER', 'https://thesilkfactory.biz'); // Use secure webserver for catalog module and/or admin areas? define('ENABLE_SSL_CATALOG', 'false'); define('ENABLE_SSL_ADMIN', '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) define('DIR_WS_ADMIN', '/adminabc/'); define('DIR_WS_CATALOG', '/zencart/'); define('DIR_WS_HTTPS_ADMIN', '/adminabc/'); define('DIR_WS_HTTPS_CATALOG', '/zencart/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); 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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/'); // * DIR_FS_* = Filesystem directories (local/physical) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_ADMIN', '/home/content/39/xxxxxx/html/adminabc/'); define('DIR_FS_CATALOG', '/home/content/39/xxxxxx/html/zencart/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); define('DB_SERVER', 'the1103412435553.db.xxxxxx.hostedresource.com'); define('DB_SERVER_USERNAME', 'xxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxxx'); define('DB_DATABASE', 'xxxxxxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/content/39/xxxxxxx/html/zencart/cache'); // EOF
22 Feb 2011, 7:49 PM
#12
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

looks to me like the right changes have been made to the above admin/includes/configure.php file

Have exhausted my meagre know-how!

Would be most grateful for a nudge in the right direction now.

With thanks in anticipation,
P

22 Feb 2011, 8:14 PM
#13
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

Finally here is the includes/configure.php as it currently is up at the root:

<?php /** * @package Configuration Settings circa 1.3.9 * @copyright Copyright 2003-2010 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 2011-02-03 01:02:35 */ /*************** 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://thesilkfactory.biz'); define('HTTPS_SERVER', 'https://thesilkfactory.biz'); // Use secure webserver for checkout procedure? define('ENABLE_SSL', '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) define('DIR_WS_CATALOG', '/'); 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) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_CATALOG', '/home/content/39/xxxxxxx/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/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); define('DB_SERVER', 'xxxxxxx.db.xxxxxxx.hostedresource.com'); define('DB_SERVER_USERNAME', 'xxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxxx'); define('DB_DATABASE', 'xxxxxxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/content/39/xxxxxxx/html/cache'); // EOF
22 Feb 2011, 9:47 PM
#14
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

Please can a totally zenned zenner let me know if I have followed the https://www.zen-cart.com/tutorials/index.php?article=122 instructions correctly.

Looking at these files I am wondering if a few more of the url's need editing?

With thanks,
P

22 Feb 2011, 10:43 PM
#15
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

ok latest update after I further edited the configure.php's to include all instances in both files of url's highlighted in https://www.zen-cart.com/tutorials/index.php?article=122 :smile:

Previously, and perhaps rather strangely, I had thought that those urls tagged with (in admin) meant that that was all that was required to be done in admin/includes/configure.php!

Got the Admin back

Still a 404 error for the website url

22 Feb 2011, 11:25 PM
#16
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

I'm thinking that the inability to access the website has something to do with the way Zencart was installed on my host server which happens to be GoDaddy.

I can see under My Applications on the GoDaddy Hosting Connection that the site url is still shown with /zencart. Clicking on it brings up a 404 error.

Typing just the website url into the browser address bar defaults to mywebsiteurl/zencart and a 404 error.

So it looks like all the previous work done to move to the root is not reflected in the GoDaddy system which still connects my websiteurl to /zencart/ ! :shocking:

If that makes any sense?

Can anybody suggest a way through this.

With thanks,
P

23 Feb 2011, 1:31 PM
#17
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

Am trying an uninstall / reinstall of zencart at the host root directory after app and db backups.

All a bit of a mess right now but will post results if any progress :unsure:

24 Feb 2011, 8:02 AM
#18
philipb avatar

philipb

New Zenner

Join Date:
Feb 2011
Location:
Manchester, UK
Posts:
55
Plugin Contributions:
0

Re: Failed move to root

OK final comment on this situation - all restored and working as required :clap:

With apologies to the more experienced zenners out there!

  1. Be rigourous and organised about backups
    2) Believe in the tutorials; they will get you through.
  2. Read as many other related forum entries as poss because they feed your search for a better understanding of the software and how it works.
  3. Where they are open to misinterpretation, methodically try and then try again
  4. In this situation I read https://www.zen-cart.com/tutorials/index.php?article=122 to mean that those items tagged as (in admin) were the only items to be adjusted in admin/includes/configure.php and that the remaining items applied only to /includes/configure.php Thanks to barco57 for the right gentle nudge on that.
  5. In addition to the changes made to the zencart files, consider what has to be changed at the host end.
  6. In this situation there was a requirement to uninstall the zencart app from the /zencart/ folder and re install it at the host root.
  7. It has to be said that the process of uninstalling and re installing both the app and the db was very slick - GoDaddy hosting get top marks for this at least.
  8. Following the re install consider the re adjustments required at the configure files end.
  9. In this situation amendments to the db name, username and password were required
  10. Finally edit any redirects or equivalent that had been used to point the original /zencart/ installation to your domain to overcome 404 errors!

Onwards with the journey!
P