Reply to Re: Undefined variable passing vars locally via URL

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация