Re: $previous variable ?

From: Date: Wed, 12 Jul 2006 21:31:11 +0000
Subject: Re: $previous variable ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-239379@lists.php.net to get a copy of this message
On Tue, July 11, 2006 2:24 am, Roman Rumisek wrote: > I am using apache 2.0.50 and php 4.4.3RC2 as mod (on Mandrake 10.1). > When I run this script: > > <? echo "$previous"; ?> > > in cli php, i give 'Undefined variable' error message - OK. > But under apache, this variable has value 'N'. Is it error ? > I found nothing about $previous variable in php.ini and php config > directories. My first guess would be that you have "register_globals" set to "ON" in Apache, and $previous is set in Cookies or Get data. It's also possible that you have managed to do this in some setup with session.auto_start and where $_SESSION['previous'] is set to "N" Having register_globals set to "ON" is probably a Bad Idea for various reason. Using short tags (<? instead of <?php) is also a Bad Idea. Finally, echo "$previous"; is silly, as the quote marks serve no purpose at all. echo $previous; would be better. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#239379) next »