php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21786 session starts, no data written
Submitted: 2003-01-20 19:00 UTC Modified: 2003-01-26 18:47 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: herps at raqtweak dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.0 OS: Redhat 6.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: herps at raqtweak dot com
New email:
PHP Version: OS:

 

 [2003-01-20 19:00 UTC] herps at raqtweak dot com
Hi,

I lately upgraded from 4.1.2 to 4.3.0... And then after a little while I noticed...

Sessions are not written, that is, the DATA of it is not...
session_start generates a session indeed, I see it when I print the ID# or even look in my /tmp folder... I see it right there... 
but when I view the session file, I see the variable name I used with register, but NO VALUE!!! if I (just for fun) get my FORM from POST to GET, I DO see the value... but when I do
<? 
session_start();
session_register('testthis');
print "$testthis - BLA";
?>
I *ONLY* get " - BLA" and nothing else....

I searched the bugs-database, and I saw more peeps have this problem...
Is this a known BUG, or...?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-20 21:35 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.


Works fine here. Check your php.ini settings and read the manual here: 

  http://www.php.net/manual/en/ref.session.php


hint: register_globals & php.ini

 [2003-01-20 21:47 UTC] herps at raqtweak dot com
Please stand corrected.

I checked that manual page, all my setting are like that! I HAVE THE DEFAULT 4.3.0 settings!

Also, the register_globals is turned on, but on or off, does not seem to matter!

I'll be awaiting your input.

Thanks
 [2003-01-20 22:51 UTC] sniper@php.net
Please provide a script that actually has some way to WORK.
As you script never stores anything in the variable,
how can it contain anything? Magic?

 [2003-01-20 22:59 UTC] herps at raqtweak dot com
Sniper,

the script I gave you was of course only an EXAMPLY, to give you an idea...
Here is a schematic example of what I have...
<?
session_start();
session_register('variable');
print "$variable";

if(!IsSet($variable)) {
?> <HTML CODE - BLABLA>
<FORM ACTION="<?php echo $PHP_SELF; ?>" METHOD="POST" >
	<SELECT NAME="whichraq">
	<OPTION VALUE="var1">var1</OPTION>
	<OPTION VALUE="var2">var2</OPTION>
	</SELECT>
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE=">> Proceed">
<? 
else {
// PART 2
blablabla
}
?>

Now, if I DONT use sessions, it passes on fine to part 2... But I also have a part 3 (it is a script which has several steps)...

Now, UNLESS I use hidden <INPUT>'s it DOES NOT pass on variables... This is what register_global could do, but as your php.ini says that might be dangerous (security reasons)...
In my case that is the case, since the script also asks for user passwords!! See the danger? I can not use register_globals, or hidden <INPUTS> (HTML form) since that is not very safe... Sessions however would be a great solution...
Now, when I DO NOT use sessions, it passes on fine to step 2, not to step 3 UNLESS I use <INPUTS>
If I use sessions, it DOES NOT proceed to step 2, meaning obviously $variable is NOT set (see check for first step)... If I do a print "$variable"; that also gives me NOTHING....
 [2003-01-20 23:19 UTC] sniper@php.net
So is register_globals=off in your php.ini or NOT?
Do you understand what it does?

 [2003-01-20 23:21 UTC] herps at raqtweak dot com
YES I understand what it does.
And currently it is ON
I turned it OFF (just to test if THAT would work) and restarted apache... SAME result...
ON/OFF... No difference...
 [2003-01-26 18:47 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

In your script, you never store anything in the variable,
so how could it contain anything?

PLEASE ask further question on php-general@lists.php.net
as this is not any bug in PHP.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 28 00:00:01 2025 UTC