#21786 [Opn->Fbk]: session starts, no data written

From: Date: Tue, 21 Jan 2003 05:19:29 +0000
Subject: #21786 [Opn->Fbk]: session starts, no data written
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-30783@lists.php.net to get a copy of this message
ID: 21786 Updated by: sniper@php.net Reported By: herps@raqtweak.com -Status: Open +Status: Feedback Bug Type: Session related Operating System: Redhat 6.1 PHP Version: 4.3.0 New Comment: So is register_globals=off in your php.ini or NOT? Do you understand what it does? Previous Comments: ------------------------------------------------------------------------ [2003-01-20 22:59:31] herps@raqtweak.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 22:51:00] 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 21:47:55] herps@raqtweak.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 21:35:42] 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 19:00:58] herps@raqtweak.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...? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21786&edit=1

« previous php.bugs (#30783) next »