ID: 21786
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Feedback
+Status: Open
Bug Type: Session related
Operating System: Redhat 6.1
PHP Version: 4.3.0
New Comment:
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...
Previous Comments:
------------------------------------------------------------------------
[2003-01-20 23:19:29] [EMAIL PROTECTED]
So is register_globals=off in your php.ini or NOT?
Do you understand what it does?
------------------------------------------------------------------------
[2003-01-20 22:59:31] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
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
------------------------------------------------------------------------
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/21786
--
Edit this bug report at http://bugs.php.net/?id=21786&edit=1