baaaan
06-09-2006, 04:50 PM
We are currently having quite the dilemma when it comes to register_globals.
We are setting up register_globals on a local, as-needed basis. We have a "test" directory on our server and have register_globals turned on locally for this directory. If you run phpinfo() within this directory, it tells you that register_globals are "On" for the local value and "Off" for the master value.
However .. it seems that register_globals aren't actually enabled, despite what the phpinfo() information says. I run the following script to act as a simple test, as it's clear that I can't rely on the configuration settings themselves:
<form method="post" action="globalstest.php?result=1">
<input type="hidden" name="testvalue" value="true" />
<input type="submit" value="Click to Test" />
</form>
<?php
if($_GET['result']) {
if($testvalue == "true") {
echo "<p>(POST) Register globals are on.</p>";
} else {
echo "<p>(POST) Register globals are <strong>not</strong> on.</p>";
}
}
?>
Can anyone provide any insight? We've tried the same thing on another server (both are running IIS) and we are having the same issue.
Thanks!
We are setting up register_globals on a local, as-needed basis. We have a "test" directory on our server and have register_globals turned on locally for this directory. If you run phpinfo() within this directory, it tells you that register_globals are "On" for the local value and "Off" for the master value.
However .. it seems that register_globals aren't actually enabled, despite what the phpinfo() information says. I run the following script to act as a simple test, as it's clear that I can't rely on the configuration settings themselves:
<form method="post" action="globalstest.php?result=1">
<input type="hidden" name="testvalue" value="true" />
<input type="submit" value="Click to Test" />
</form>
<?php
if($_GET['result']) {
if($testvalue == "true") {
echo "<p>(POST) Register globals are on.</p>";
} else {
echo "<p>(POST) Register globals are <strong>not</strong> on.</p>";
}
}
?>
Can anyone provide any insight? We've tried the same thing on another server (both are running IIS) and we are having the same issue.
Thanks!