Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

background link: http://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
share|improve this question
    
Adding the exact version of PHP in your question will be helpful to check against bugs. –  SparX Aug 10 '11 at 21:13
    
valid point: PHP 5.3.6 –  Damo Aug 10 '11 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 '11 at 23:24
    
Thanks, I'll review. Code can be viewed here: stackoverflow.com/questions/7014945/… –  Damo Aug 11 '11 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 '11 at 20:22

1 Answer 1

up vote 0 down vote accepted

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 http://stackoverflow.com/questions/7014945/php-upgrade-5-2-to-5-3-session-issue

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.