|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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...?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 00:00:01 2025 UTC |
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....