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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to