php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20524 Session => empty files
Submitted: 2002-11-20 15:52 UTC Modified: 2002-12-08 03:08 UTC
Votes:7
Avg. Score:5.0 ± 0.0
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:5 (71.4%)
From: thibaud at phpnet dot org Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.2.3 OS: Mandrake et Redhat
Private report: No CVE-ID: None
 [2002-11-20 15:52 UTC] thibaud at phpnet dot org
I have just compiled PHP in CGI because it improves sharply the performances of my machine (load fall).
On the other hand, I have a big probleme with the sessions. 

INDEED, when one makes a simple script :

By going on the script with IE: The session is created well on the server but it is empty. (File of session empties).

WHILE by going there with Netscape, it work. 

The script handled by php in module works perfectly under both navigators. 

I have heard about such a probleme but I did not find solution which works. More inquietant still (!) : 
I compiled as on 3 different servers and on two, it does not work while on the other whom has EXACTLY the same config php + apache + configure lines, it works!!! 
(http://80.245.32.147/phpinfo)

You can consult the phpinfo of server who does not work on http://phph2.phpnet.org/phpinfo.php 

A simple script of session :
http://www.phpnet.org/script.php work perfectly
http://phph2.phpnet.org/script.php doesn't save the session !

Have you met the probleme? 

Please help me !

PS: I tried all the versions:) php 4.2.2 , 4.1.2 , 4.2.3.... And nobody works.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-20 16:26 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-11-21 01:41 UTC] thibaud at phpnet dot org
I have try IT yesterday and .... the probleme is the same !

http://phph1.phpnet.org/script.php

please help me
 [2002-11-21 02:21 UTC] thibaud at phpnet dot org
IF I add a sleep(2) before session_register("essai");
the session is normaly sauved.
I test the lastest php 4.3* release....
 [2002-11-21 17:37 UTC] sniper@php.net
We need to see your code, please put the sources of those
scripts available too.

And DO NOT add comments to your own bug report, update the status and version information when they change!

 [2002-11-22 00:36 UTC] thibaud at phpnet dot org
script.php :
<?php

$essai = "test";
session_start();
session_register("essai");
header("Location: script2.php?".session_name()."=".session_id()."");
?>

script2.php :
<?php
session_start();
echo $essai;
?>
 [2002-11-22 00:41 UTC] thibaud at phpnet dot org
my problem is the same than http://bugs.php.net/bug.php?id=20537

please help me.
The php 4.3-dev let me a lot of problems for my users : function alredy declared, setlocale(), others errors...

I'm obliged to used php 4.1* or 4.2*

thanks al lot for you help 
PS : it's for more than 500 users in the world (90 request per second !)
 [2002-11-22 10:31 UTC] sniper@php.net
Please take a look at the solution on this bug report:

  http://bugs.php.net/bug.php?id=20025

As this only happens with IE, I think it might be 
the same problem..

 [2002-11-22 12:16 UTC] thibaud at phpnet dot org
Yes but no :)

It is the same problem with this config.

I desespere !
Please help me.
 [2002-11-23 15:54 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Your example session code is not correct. It should be something like this:
<?php
session_start();
$_SESSION['essai'] = "test";
header("Location: script2.php?".session_name()."=".session_id());
?>

<?php
session_start();
echo $_SESSION['essai'];
?>
 [2002-11-23 16:41 UTC] thibaud at phpnet dot org
No !

Because the register_global is defined as On.

register_argc_argv
 On On 
register_globals
 On On 

And when the register_globals is defined as On, the session params can be used as variable ...

It's indeed a bug because the variables of session are not sauved in files. (0 lines in the file created).

In every case, I decided to go back php in module apache because mod_bandwidth of apache seems to talk an incompatibility with php in CGI (the scripts php are not  interpretes when it is activated..) 

If you have a solution for the two problems...

To part it, please , think you whom it is preferable to cross php in CGI or to leave it in module (by knowing that I have a lot of traffic (90 requests per second))
 [2002-12-03 09:13 UTC] thibaud at phpnet dot org
Please HELP ME !
I'm very blocked by that problem.

Thanks a lot for you reply
 [2002-12-07 01:27 UTC] iliaa@php.net
Does it work when you try my suggestion of using $_SESSION ?
 [2002-12-07 02:43 UTC] thibaud at phpnet dot org
I have solved my problem !

In the apache configuration :
KeepAlive Off

http://www2.phpnet.org/phpinfo.php

Its always a php bug !

Thanks but your suggestion of using $_SESSION did not resolv the problem.
My solution work fine...

Cordially
 [2002-12-07 10:07 UTC] iliaa@php.net
Do you have any ideas as to why turning KeepAlive off solved the problem?
 [2002-12-07 10:12 UTC] thibaud at phpnet dot org
NO :)
I don't know why but Its working fine when KeepAlive is in Off and doesn't work when it is defined as On !

If you have an idea...
It is php-4.1.2, php-4.2.2 or php 4.2.3 and apache 1.3.27
(other versions < 4.1.2 is exactly pareil....)

http://www2.phpnet.org/phpinfo
 [2002-12-08 03:08 UTC] sniper@php.net
This is not PHP bug at all:

http://httpd.apache.org/docs/misc/known_client_problems.html


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 31 23:00:03 2025 UTC