[PHP-DEV] PHP 4.0 Bug #8562 Updated: Sessions fail with Netscape From: sniper <email protected>
Date: 01/06/01

ID: 8562
Updated by: sniper
Reported By: pojanen <email protected>
Old-Status: Open
Status: Feedback
Bug Type: *Session related
Assigned To:
Comments:

Please add a complete but short script which can be used to reproduce this
problem.

Have you tried newer Netscape versions? 4.08 is quite old.

--Jani

Previous Comments:
---------------------------------------------------------------------------

[2001-01-05 04:31:56] pojanen <email protected>
PHP 4.0.3 was very buggy with sessions. PHP 4.0.4 works a lot better but I think I have discovered a bug again.

I can't find anything wrong in my code... the bug is very weird. It only happens with Netscape. Netscape Navigator 4.08.

When I try to login (with Netscape 4.08) in my webshop using a form generated by the webshop -> sessions doesn't get saved correctly. But when I press Reload -> the problem will be corrected. With Internet Explorer this works fine at the first time.

Here is the incorrect session data:

SESSION|a:2:{s:12:"ShoppingCart";O:12:"shoppingcart":3:{s:8:"products";a:0:{}s:9:"discounts";a:0:{}s:5:"owner";i:0;}s:12:"ClientConfig";O:12:"clientconfig":3:{s:12:"showPictures";b:1;s:14:"productsOnPage";i:10;s:8:"currency";s:3:"FIM";}}

Here is the correct one (after I press reload or first time with IE):

SESSION|a:2:{s:12:"ShoppingCart";O:12:"shoppingcart":3:{s:8:"products";a:0:{}s:9:"discounts";a:0:{}s:5:"owner";s:1:"2";}s:12:"ClientConfig";O:12:"clientconfig":3:{s:12:"showPictures";b:1;s:14:"productsOnPage";s:1:"8";s:8:"currency";s:3:"FIM";}}

They look pretty same but they are not. owner values should be 2 like in the second example and productsOnPage should be 8.. 0 and 10 are defaults (in the first one) but they are modified to 2 and 8. Somehow PHP doesn't save the modified values.. it saves the first values which are made by my class constructor. (I use $SESSION array which contains two classes)

This is very very STRANGE. Browser shouldn't have anything to do with it but it does. I do no browser checkups so it must be in PHP. If cookies are enabled/disabled it does the same thing.

And btw. This works correctly in PHP 4.0. but not in 4.03 & 4.04.

What could be wrong ?

---------------------------------------------------------------------------

Full Bug description available at: http://bugs.php.net/?id=8562

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>