ID: 20449 Comment by: dave at flitsservice dot nl Reported By: josh at zebotech dot com Status: Open Bug Type: Session related Operating System: redhat 7.3 PHP Version: 4.4.0-dev New Comment:
* PHP Version 4.2.2 (and 4.1.1) * Apache 2.0.40 (and 1.3.23) * Windows NT 5.1 build 2600 (Windows XP sp1) Allright, I experience this problem also! (thnx Google). It drives me mad, I already did a downgrade to PHP v4.1.1 without succes. I experience the same situation as jpmarray, the page looks like it loads, I get some HTML code and a part of my page is displayed... Suddenly it breaks off the output showing some unfinished HTML code and a "Page cannot be displayed" occurs. And I'm talking of the well known phpinfo.php now! The strange thing which someone else mentioned also here, is that it works perfectly well with all non-IE related browsers. I tested it for example with Mozilla 1.0 and everything is working fine. And now comes the strange part. I have another server here, running exactly the same OS (Windows NT 5.1 build 2600) and exactly the same installation and php.ini file (version 4.1.1) and that is working perfectly well. The only difference is the Apache server version; 1.3.23 And I don't want to downgrade Apache unless I have too... Oh and another thing, I tried to run phpinfo.php on different machines, all resulting with the same problem. No go with IE and Mozilla and Opera 7 everything looks OK... But while I test this when I'm writing this now, I see that it isn't OK either with other browsers... It does not result in a "page cannot be found" error but it just unfinishes the page ending. This looks like it's doing it at random... Sometimes stopping earlier and sometimes near the end of the output... Very strange! Nothing is wrong with my php maximum execution time or something. Remember that I have two different servers with exactly the same PHP installation... Maybe I'll try an Apache downgrade to exclude some things out tomorrow... First I'll get some sleep, luckily this is less critical than the problem of Josh... Dave Lolkes de Beer The Netherlands Previous Comments: ------------------------------------------------------------------------ [2003-01-31 14:57:30] jpmurray at hxti dot com Hello all, * PHP Version 4.2.3 * Apache 1.3.27 * Linux * config: ./configure' '--with-apxs' '--with-oci8=/usr/local/oracle/m01/app/oracle/product/8.1.7/' '--with-openssl' '--with-curl' '--with-mysql' I'm having this problem every day, and can reproduce at will. Extremely frustrating. For me it only occurs upon (successful) login to my site. Instead of going to the php index, I get a "Page cannot be displayed". I'm using non-cookie sessions managed by an Oracle database. Once I am in, past the login, the error never occurs however. It seems only to be a problem when the session is first initialized via session_start(). After this, I pass the sid via the URL, and its subsequently checked by the target script against the oracle db for authenticity- No problems at all there. Does anybody else see this problem occur only upon doing things such as logging in? Thanks, J. Murray HX Technologies ------------------------------------------------------------------------ [2003-01-08 11:45:20] phpBug20449 at rehner dot net Further testing shows that on Windows 2000 Server with Identical Configurations as the Windows 2000 Pro (I did diffs to be sure) reveals: Win2000Server 2 Processor- 2 failues in an estimates 300,000 tests. Win2000Server 4 processor - 0 failures in 1000 tests (Just started running this one.) Basically I had everyone in the office run the test against the 2 Processor system at the same time. Only 2 failures in that many requests I can live with. So is it more of an issue on less capable systems? ------------------------------------------------------------------------ [2003-01-08 01:52:58] josh at zebotech dot com interesting. However, I switched my session manager to a dbase function and it still died. How would file locking effect that? I'm interested in the fact though that you can actually witness the bug first hand. I only saw that it was happening. However, I could never get the thing to happen to me. Also, since I have gone to my own session code without using php's built in sessions, I don't have problems at all anymore. Josh ------------------------------------------------------------------------ [2003-01-08 01:19:06] bug20449 at rehner dot net My script will fail in as short as 1 request or over 1000 requests. I did set session.gc_probability = 0 but still fails. -Ryan ------------------------------------------------------------------------ [2003-01-08 01:13:53] phpBug20449 at rehner dot net I CAN REPRODUCE THIS BUG!!! Sort of… I too had my software working perfectly for over a year under PHP 4.0.6 / Apache 1.3.24 on Win2000 Pro (development) Win2000 Server (production). After upgrading to PHP 4.2.3 / Apache 1.3.27 I've been pulling my hair out with this session disappearing problem. I tried just about everything I could find in the bug lists mentioned in this bug to no avail, short of trying latest CVS. I'm short on time and resources and from what I read; they haven't fixed the problem yet. As far as it being a serialization problem I don't think so. None of my session variables are more complex than a string. So I wrote a simple test and I know it's not IE specific. I could recreate the problem with IE 6, Opera 6.05, Netscape 7.0, and Mozilla 1.3 I striped the test to be as simple as 1 integer as a session variable and it would still die. I removed the counting aspect to verify it wasn't a write problem, just reading session data would kill it as well. The error seems to occur if requests are made to the session variable from different files close enough together in time to cause one to "lock" the session file while the next request tries to access it. Resulting in this error: Warning: open(c:\tmp\sess_c6bdd642a5d88639e785ec13b0d2f126, O_RDWR) failed: Permission denied (13) in c:\apache\htdocs\testing\session2.php on line 10 Obviously it DOES have permission or else my scripts would fail all the time. This does fail on all Windows servers I tested with PHP 4.2.3. I did try it on a Slackware 8.1 with PHP 4.2.1 / Apache 1.3.24 and it did NOT fail. I hope this helps track down the elusive bug so I don't have to downgrade back to 4.0.6 but I'm left with few options. I will try a CVS if you think it might fix it but I've already spent more time than I have on this. And from what I read, they don't fix it. If you need more info just ask. I'll try to do what I can. My test consists of 4 files. Obviously the comments are not part of the files. //----------------file: session0.php -------------------- // Just used to clean things up when they get ugly. //------------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head><title>Session Test</title></head> <body> <pre> <?php session_start(); session_unset(); session_destroy(); print_r($_SESSION); ?> </pre> <a href="session1.php">Load Values</a> </body> </html> //----------------file: session1.php -------------------- // Sets up the session vars //------------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head><title>Session Test</title></head> <body> <pre> <?php session_start(); $_SESSION['count'] = 0; $_SESSION['test_int'] = 2; $_SESSION['test_real'] = 3.5; $_SESSION['test_char'] = 'a'; $_SESSION['test_string'] = 'abc'; $ary = array(); $ary[] = 'z'; $ary[] = 'y'; $ary[] = 'x'; $_SESSION['test_array'] = $ary; print_r($_SESSION); ?> </pre> <a href="session0.php">Reset</a> <br> <a href="session2.php">Start Test in single page</a> <br> <a href="sessionFrames.php">Start Test in frames</a> </body> </html> //----------------file: session2.php -------------------- // Calls itself repeatedly, increments count //------------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head><title>Session Test</title></head> <body> <pre style="font-size: 8pt;"> <?php session_start(); if (isset($_SESSION['count'])) { $_SESSION['count']++; } else { ?> <script><!-- alert("Session LOST!"); --></script> <?php } print_r($_SESSION); ?> </pre> Running... <?php if (isset($_SESSION) && isset($_SESSION['count']) && ($_SESSION['count'] > 0)) { ?> <script><!-- setTimeout("document.location.href='session2.php'", 0); --></script> <?php } else { ?> Session LOST! <?php } ?> </body> </html> //-------------file: sessionFrames.php ------------------ // Defines the frameset //------------------------------------------------------- <html> <head><title>Session Test</title></head> <frameset rows="50,50,50,50" framespacing="0" border="1" frameborder="1"> <frame name="1" src="session2.php" scrolling="no" noresize marginwidth="0" marginheight="0"> <frame name="2" src="session2.php" scrolling="no" noresize marginwidth="0" marginheight="0"> <frame name="3" src="session2.php" scrolling="no" noresize marginwidth="0" marginheight="0"> <frame name="4" src="session2.php" scrolling="no" noresize marginwidth="0" marginheight="0"> <noframes> <p>This page uses frames, but your browser doesn't support them.</p> </noframes> </frameset> </html> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/20449 -- Edit this bug report at http://bugs.php.net/?id=20449&edit=1