It seems that logging into the admin pages with zen-cart-1.3.7.1 using PHP-4.3.2 is broken. After entering the correct login/passwd, it will just return back to the login page.
The issue has to do with the call to session_regenerate_id() from zen_session_recreate() in includes/functions/sessions.php (which is called from admin/login.php).
According to the php documentation for php, "Version 4.3.3: Since then, if session cookies are enabled, use of session_regenerate_id() will also submit a new session cookie with the new session id." See the documentation here:
That means that 4.3.2 does not submit a new session cookie with the new session id.
The fix provided by buraks78 in the comments in the link above seems to address the issue and fix the zen-cart login to the admin page.
Basically, add this directly after the call to session_regenerate_id() in includes/functions/sessions.php:
Code:
if(!version_compare(phpversion(),"4.3.3",">=")){
setcookie(
session_name(),
session_id(),
ini_get("session.cookie_lifetime"),
"/"
);
}
Herb.
Bookmarks