0

background link: https://stackoverflow.com/questions/7014945/php-upgrade-5-2-to-5-3-session-issue

I have upgraded PHP on my 2008 std server from PHP 5.2 to PHP 5.3. Following the upgrade, sessions no longer work correctly.

I have copied over the settings from my PHP.ini files which are applicable and configure new settings in line with the server or PHP's recommendations.

PHP executes fine correctly, however session data does not get saved.

I have session data stored in c:\temp. For each session created, I can see the session file in this folder. However no information gets written into the session file. Permissions wise, IUSR and EVERYONE has write access to this folder.

If I downgrade to PHP 5.2, sessions are saved correctly and the site functions correctly.

I have followed advise to ensure my code is optimised. closing session files correctly and forcing a session reset.

I'm stumped.

session

Session Support enabled Registered save handlers files user sqlite Registered serializer handlers php php_binary wddx
DirectiveLocal ValueMaster Value session.auto_startOffOff session.bug_compat_42OnOn session.bug_compat_warnOnOn session.cache_expire180180 session.cache_limiternocachenocache session.cookie_domainno valueno value session.cookie_httponlyOffOff session.cookie_lifetime00 session.cookie_path// session.cookie_secureOffOff session.entropy_fileno valueno value session.entropy_length00 session.gc_divisor100100 session.gc_maxlifetime14401440 session.gc_probability11 session.hash_bits_per_character44 session.hash_function00 session.namePHPSESSID53PHPSESSID53 session.referer_checkno valueno value session.save_handlerfilesfiles session.save_path/temp/temp session.serialize_handlerphpphp session.use_cookiesOnOn session.use_only_cookiesOnOn session.use_trans_sid00
5
  • Adding the exact version of PHP in your question will be helpful to check against bugs.
    – SparX
    Aug 10, 2011 at 21:13
  • valid point: PHP 5.3.6
    – Damo
    Aug 10, 2011 at 21:21
  • I see a number of session variables deprecated in php 5.3.X. Please refer php.net/manual/en/migration53.deprecated.php and confirm that you are not using them. If you are not using them in your code and still getting this error, you may need to provide the code snippet for further review as there is no session related bugs reported yet for PHP 5.3.6.
    – SparX
    Aug 10, 2011 at 23:24
  • Thanks, I'll review. Code can be viewed here: stackoverflow.com/questions/7014945/…
    – Damo
    Aug 11, 2011 at 8:06
  • Please add your answer from the SO answer to here, or go ahead and close/delete this so it isn't hanging around.
    – Aaron
    Oct 7, 2011 at 20:22

1 Answer 1

0

the problem was related to the last session name "(@#!_D@R&$%(){*@)_D_296", it was somehow invalidating the entire browser session, removing all data from the session.

After removing "(@#!_D@R&$%(){*@)_D_296" from the session name, the login session started working again.

details see https://stackoverflow.com/questions/7014945/php-upgrade-5-2-to-5-3-session-issue

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .