Zen Cart Logo
Forums / Installing on a Linux/Unix Server / errors when moved to new provider

errors when moved to new provider

Locked

Views: 2,341

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
4 Jun 2006, 4:16 AM
#1
kevinm2 avatar

kevinm2

Zen Follower

Join Date:
Aug 2004
Posts:
272
Plugin Contributions:
0

errors when moved to new provider

I am getting the following error:

Warning: fopen(/cache_gt/zc_7eb4ed1f36d90140477d9474b61e0e26.sql): failed to open stream: No such file or directory in /home/content/k/e/v/kevinm2/html/DomainDirectory/includes/classes/cache.php on line 116

Note: my cache folder (cache_gt) is outside of the DomainDirectory (one level back). I don't know why I did it that way!

my /DomainDirectory/includes/configure.php reads as follow:

// Define the webserver and path parameters
// Main webserver: eg, http://localhost - should not be empty for productive servers
define('HTTP_SERVER', 'http://www.MyDomain.com');
// Secure webserver: eg, https://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://www.MyDomain.com');
// secure webserver for checkout procedure?
define('ENABLE_SSL', 'true');

// 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_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_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_BLOCKS', DIR_WS_INCLUDES . 'blocks/');
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', '/DomainDirectory/');

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', ''); // eg, localhost - should not be empty
define('DB_SERVER_USERNAME', '
');
define('DB_SERVER_PASSWORD', '');
define('DB_DATABASE', '
');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'

// 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', 'file');
define('DIR_FS_SQL_CACHE', '/cache_gt');

?>

4 Jun 2006, 4:31 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: errors when moved to new provider

kevinm2:

failed to open stream: No such file or directory in **/home/content/k/e/v/kevinm2/html/DomainDirectory/**includes/classes/cache.php on line 116
kevinm2:

define('DIR_FS_CATALOG', '/DomainDirectory/');

define('SQL_CACHE_METHOD', 'file');
define('DIR_FS_SQL_CACHE', '/cache_gt');

Three things you should do:

  1. Fix the path to your cache_gt folder to include the full system path. The error message tells you the full system path to the "DomainDirectory" folder. This should help you determine the right path to enter here.

TEST and make sure you have fixed the error before going on to the next 2 steps:

  1. Change your SQL_CACHE_METHOD to 'none' or 'database'.
    ('file' is for backward support to much older system requirements, and the others are more reliable and faster)

  2. Once you determine the right path to #1 above, go to Admin->Configuration->Sessions and set the Session Write Directory to the same folder you set in #1 above.

4 Jun 2006, 6:13 AM
#3
kevinm2 avatar

kevinm2

Zen Follower

Join Date:
Aug 2004
Posts:
272
Plugin Contributions:
0

Re: errors when moved to new provider

Thanks Dr Byte.

1- Fixed the path. I now can get in the site.

But I get the follwoing warning

Warning: I am able to write to the configuration file: /home/content/k/e/v/UserName/html/DomainDIrectory/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

What should the permission on the configure.php be? it is now 644.

and also browser gives a none stop read message.

2 - As for "Change your SQL_CACHE_METHOD to 'none' or 'database'." WHich do you recommend 'none' or 'database'?

4 Jun 2006, 10:26 PM
#4
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: errors when moved to new provider

Permissions on the configure.php files depend on the server - but usually with Apache 'Read Only' permissions are either 444 or 400.

Vger

5 Jun 2006, 3:21 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: errors when moved to new provider

kevinm2:

2 - As for "Change your SQL_CACHE_METHOD to 'none' or 'database'." WHich do you recommend 'none' or 'database'?
Either is fine. Both will produce almost equal results as of Zen Cart v1.3.