php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15120 Netscape sessions contain no data
Submitted: 2002-01-20 02:05 UTC Modified: 2002-02-07 11:42 UTC
From: debbie at dcwebserv dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
 [2002-01-20 02:05 UTC] debbie at dcwebserv dot com
I have been trying to implement some shopping cart software that uses a MySQL database and sessions to track the shopping carts.  When you access the shop using IE and add an item to the cart, everything is fine.  But when you access the shop using a Netscape browser (version 4.61) or an AOL or CompuServe browser, try to add an item to the cart, it comes back and tells you the cart is empty.  This also happens when you try to login.

The sessions are kept in a /tmp directory on my server.  When I go in an look at the sessions, there are sessions created for both IE and Netscape, only the Netscape session contains no data.

This software is Open Source software and I have gone into many other people's shops and not had this problem which leads me to believe that it may be server/php related.  What do you folks think?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-20 03:04 UTC] yohgaki@php.net
What is the URL for downloading your cart?
Does this happen with 4.1.1?
 [2002-01-20 06:23 UTC] debbie at dcwebserv dot com
I am in a virtual hosting situation where I have telnet access, but not root access...so I haven't been able to install 4.1.1.  I have been in touch with the support folks on my server asking if they would upgrade to 4.1.1, but I don't have an answer for that yet.  I'm sure they would agree to the upgrade if I could establish that this is definitely a bug with the php version 4.0.6, though.

The URL of my customer's shop is http://www.jokesrwild.com/catalog
The software itself can be found at http://www.oscommerce.com.

It's not a live shop yet, so you can poke around all you want.

Thanks
 [2002-01-20 09:19 UTC] yohgaki@php.net
I verified with my Netscape 4.77/U.S., 26-Mar-01;
It does not work with my Netscape, but it works with my Mozilla 0.9.7+.

I guess you have your PC or test PC, could you reproduce with your PC?
If yes, please try if it happens with 4.1.1.

Could you make a short reproducible script?


 [2002-01-20 11:04 UTC] debbie at dcwebserv dot com
I wish I could be of more help in this issue.  My "virtual server" is merely leased space on another company's server.  I have some control, like access to the http.conf files and mail aliases, etc., but not root access.  I wouldn't know how to configure php to run on my own personal computer at home...

As far as making a reproducible script, I'm afraid that's beyond my capabilities as well.  This software uses modules, class and function folders as well as tying into the MySQL database.  Is there any other way I could help, like sending you a couple of the pertinent files (sessions.php)?

I'm generally a very good troubleshooter and "hacker" (being able to figure out how to get a program to do what I want it to), but this one has me stumped.
 [2002-01-21 14:21 UTC] debbie at dcwebserv dot com
I'm hoping you haven't given up on me...are you still able to help, even with my many limitations?
 [2002-02-06 11:46 UTC] shiflett@php.net
I'm reopening this, since I've been able to reproduce it myself. I will analyze this further at a protocol level and post the results back. This example site (http://jokesrwild.com/catalog/) works with my Mozilla 0.9.5 but not with Netscape 4.75.
 [2002-02-06 21:52 UTC] shiflett@php.net
When using Netscape 4.75 and Netscape 4.76 from a Windows 95 box I have for testing, I notice the following HTTP request given as a result of the form submission generated from clicking "In Cart" on your site.

POST /catalog/product_info.php?blahblahblah HTTP/1.0
Referer: blahblahblah
Connection:Keep-Alive
User-Agent: Mozilla/4.76 [en] (Win95; U)
Host: www.jokesrwild.com
Accept: blahblahblah
Accept-Encoding: blahblahblah
Accept-Language: blahblahblah
Accept-Charset: blahblahblah
Cookie: PHPSESSID=blahblahblah

And that's it! The two form variables, products_id and Size, are not sent. There is no Content-Type header nor any content. When using Mozilla to test this, I get the correct Content-type of application/x-www-form-urlencoded as well as the two form variables.

Can you possibly add some debugging (to a log if necessary) that captures the values (if they exist) of the form variables submitted? I just want to know if I'm on the right track. This is a weird one.
 [2002-02-07 02:44 UTC] debbie at dcwebserv dot com
Since this is open source software I'm using, I have been posting in a forum there as well.  I think we've been able to isolate this as a sort of a combination bug between versions 4.0.6 and lower of php and "virtual servers" running their system using inetd.  Here is what someone had posted on the oscommerce site:

Well, the short answer is that php4.0.6 fails to ensure that the session data is written to the datafile before the associated webserver child process terminates. This is not generally a problem because Apache is _usually_ run ith "http 1.1 KeepAlive on", MaxClients, MaxRequestsPerChild and KeepaliveTimeout set to large values so the problem would be very sporadic.

Now, Netscape 4.x uses HTTP 1.0 which does not support keepalive at all.  The problem is _still_ sporadic because the MaxRequestsPerChild is still used.

We, however do things a bit differently. Our virtual servers run from inetd which means a process is started, runs, and terminates for each request. (actually, the process will handle up to MaxKeepaliveRequests before
terminating). Since NS4 doesn't support keepalive, the server proces handles exactly *one* request befor terminating. Thus the php bug occurs _every_time.

The problem seems to be solved by installing php 4.1.1, but unfortunately for me, my hosting people will not upgrade my php to 4.1.1 (therefore, I am moving all of my sites!).

 [2002-02-07 11:42 UTC] shiflett@php.net
If the problem is solved in PHP 4.1.1, then I'm going to go ahead and close this bug.

Feel free to email me personally, and maybe I can help you work around this with your current host (unless you really are moving your sites anyway). I would suggest phpwebhosting.com as a candidate host if you're going to relocate.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Sep 16 14:01:28 2024 UTC