|
Posted by amygdala on 07/18/07 15:24
"Bob Bruyn" <bob@torusdesign.nl> schreef in bericht
news:7ulni.996$Rv4.592@amstwist00...
> I've recently installed Apache 2 and php 5.2 on my WIndows XP
> machine. Everything is up and running.
>
> I'm passing some vars via the URL. It works fine online:
> http://www.torusdesign.nl/spry/test.php?folder=schilderijen/vrij_werk&navColor=SchilderijenNAV
>
> This is the code:
> <?php echo $folder; ?>
> <?php echo $navColor; ?>
>
> The problem is that when I test it locally I get an error that the
> variable in undefined.
Hello Bob,
Since your example works on the live server (which is even worse than it
working on a development server), I would advise you to read up on the ini
file directive 'register_globals':
http://nl2.php.net/register_globals
If 'register_globals' is set to 'on' an end user can easily inject your
application with variables of their choice like so:
http://www.torusdesign.nl/spry/test.php?userid=1
So I strongly advise you to turn off 'register_globals' on the live server.
HTH
Navigation:
[Reply to this message]
|