Troubleshooting - Sessions

From Zen Cart(tm) Wiki
Jump to: navigation, search

Session save path

You need to make absolutely sure that you have set write permissions on the session directory.


Open phpMyAdmin, click the SQL tab and run this SQL query.

SELECT configuration_value FROM configuration WHERE configuration_key = 'SESSION_WRITE_DIRECTORY';

A directory path should show up, is that the correct session save path?
If not, you can change it using the following query, just replace '/path/to/tmp' with the correct path.

UPDATE configuration SET configuration_value = '/path/to/tmp' WHERE configuration_key = 'SESSION_WRITE_DIRECTORY';

When you have the correct cache path set, you need to make sure you have the correct permissions set for it. Set permissions to 777 for this directory.


Remember that if you're using a prefix to your database tables, you will need to apply that to the above queries.


PHP settings

session.referer_check

Make sure that session.referer_check is disabled. You can check this with phpinfo() or from

Admin - Tools - Server Info

If it's enabled, you need to turn it off. This can be done in php.ini, in an .htaccess file or with the php command ini_set().


All of the following methods will disable session.referer_check. The methods are listed in the preferred order.

  • php.ini
    session.referer_check =
  • .htaccess
    php_value session.referer_check none
  • ini_set()

    Place the following code

    ini_set('session.referer_check', '');
    after the license info at the top of the following files:
    includes/application_top.php
    admin/includes/application_top.php