Page 1 of 1
PHP Configuration Question
Posted: Tue Oct 21, 2003 10:01 am
by rkrames
I'm not an expert but it seems the function "requestType" is not passing variables. Does anyone have anb idea what my be wrong?
Posted: Tue Oct 21, 2003 10:06 am
by markl999
What exactly is function 'requestType' ?
Any time i see "is not passing variables" i immediately think register_globals is Off.
If register_globals is Off then you will need to use $_POST['var'] and/or $_GET['var'] instead of where you would normally just use $var;
Posted: Tue Oct 21, 2003 10:13 am
by rkrames
requestType is the name of a button that we use in a <form>, it is a POST method. The value is "Agree" and used to show up in requestType when the user clicked the "Agree" button. Now that we upgraded PHP the requestType variable stays empty, even if the form posts.
We found register_globals = Off and changed it to on but still no luck. Anything else we should look at?
Thanks!
Posted: Tue Oct 21, 2003 10:16 am
by markl999
Did you restart the web server after changing register_globals? Check a <?php phpinfo() ?> page to be sure.
register_globals being Off is prefered by the way but of course sometimes changing all your code to work with them Off isn't practical

Posted: Tue Oct 21, 2003 10:19 am
by volka
and some more infos would be nice. e.g. the output of the script at
viewtopic.php?t=8815#65245 and maybe some of your code so we can spot possible errors
Posted: Tue Oct 21, 2003 10:28 am
by rkrames
The problem was our php.ini file was in the wrong place, but now that that problem has been corrected, we have a new problem. It seems that our cookie is not getting stored for the session, so the user just keeps getting sent to our agree to terms page where the cookie is supposed to be passed. Any ideas?
Code: Select all
echo "request type:".$requestType;
if($requestType=="Agree"){
$expire=time()+60*60*24*30;
setcookie("agreeDate", "10/15/2003",$expire);
echo "<html><head><title></title></head><body>";
echo "<script language='JavaScript'>window.location='doc_dl.php'</script></body></html>";
die();
}
Posted: Tue Oct 21, 2003 10:49 am
by rkrames
problem solved thanks for the help
Posted: Tue Oct 21, 2003 10:49 am
by JayBird
always help if you post the solution you found incase anyone else has the same problem in the future.
Mark