I can't stay logged in to my Admin area
This is likely a PHP Session Handling issue.
Before you begin, be sure you are familiar with the structure and contents of configure.php files.
THE FIRST THING TO TRY is this:
- Close all your browser windows
- Open 1 browser window, and use it to clear your browser cache AND cookies.
- If you browser has a Private Browsing mode, make sure you’re NOT using “Private Browsing” mode, because that will prevent sessions/cookies from being usable
- Reboot your computer
- Turn off your firewall software and try again.
- Ensure that your stylesheets don’t contain any references to image files that don’t exist on your server.
Test in a completely different browser. IE and Chrome are known to be problematic with cookies sometimes. Switching to FireFox is a good troubleshooting step.
Don’t use spaces in your domain names, nor in the foldernames in which you’ve installed your store. If yours has a space in the path anywhere, you may have troubles. Rename the folder instead.
NEXT, try to rule out a bad SSL configuration:
- If your version is Zen Cart 1.3.9 or before, edit your
- clear browser cache AND cookies and try again. If it’s still not working:
- edit your
HTTP_SERVERto a URL that does NOT start with
- clear browser cache AND cookies and try again
IS IT A DOMAIN NAME PROBLEM?
- if your site is using just an IP address and not a named domain, then it’s possible your sessions/cookies are getting confused. Edit your 2
configure.phpfiles and set your
HTTP_SERVERto an actual domain name, NOT an IP address.
- if you’re using a domain name with
wwwin it, try removing the
wwwfrom it temporarily, again, in the
IF IT STILL WON’T WORK, read on:
- Admin login sessions (and customer login sessions) are managed via the PHP session-handling functionality.
- When you log in, a session is generated, and the session’s name is zenAdminId or zenid (for the store).
- When a session is started, PHP attempts to set a cookie in your browser. That cookie is intended to store that session ID so that it doesn’t need to be shown in the browser all the time (ie: with &zenAdminID=243524524524525 etc) at the end of all your URLs.
- If a cookie cannot be set, then PHP simply includes the session name and number (like above) on all your URLs in order to keep you logged in.
- When you log out, or the session ID is lost, the session data is reset and your authentication data is removed, requiring login again.
Possible causes of session-mgmt problems include:
- cookies are blocked by firewall or by browser configuration
- PHP is misconfigured or has certain session settings set to methods incompatible with Zen Cart such as session-auto-start and transitive-sid etc. The installer warns about these if they are a problem.
- you have your site configured to store session data in files but your filesystem doesn’t have permissions set in such a way as to allow storage of the data
- you have your site set to store session data in the database but the database table (“sessions”) is corrupt or database-storage is full and new records cannot be added.
Is your “cache” folder set to read/write (ie: chmod 777 (or some other suitable value if 777 is not permitted by your server’s configuration) ?
a) altered files on your server. In that case a proper checkup of all your files is in order: see Diagnosing obscure issues.
b) a server configuration change by the hosting company (such as a PHP version change or anything else that might result in changes to the master php.ini configuration for the server or your hosting account)
In your post, please include your Zen Cart and PHP versions, and a link to your site.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.