Re: $previous variable ?
| From: | Ray Hauge | Date: | Wed, 12 Jul 2006 21:40:34 +0000 |
| Subject: | Re: $previous variable ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239380@lists.php.net to get a copy of this message | ||
On Wednesday 12 July 2006 14:31, Richard Lynch wrote:
> 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
A bit off topic, but I hadn't heard about short tags being a bad idea. What
reasons make short tags worse than the regular tags. Just curious.
Ray
--
Ray Hauge
Programmer/Systems Administrator
American Student Loan Services
www.americanstudentloan.com
1.800.575.1099