Re: Re: $PHP_SELF
| From: | Curt Zirzow | Date: | Mon, 20 Oct 2003 14:36:33 +0000 |
| Subject: | Re: Re: $PHP_SELF | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166754@lists.php.net to get a copy of this message | ||
* Thus wrote David Otton (phpmail@jawbone.freeserve.co.uk):
> On Mon, 20 Oct 2003 09:11:37 -0400, you wrote:
>
> >"Boris Sagadin" <boris@intera.si> wrote in message
> >news:264653282.20031020132329@intera.si...
>
> >> I'm having problems with $PHP_SELF variable. Mostly it works, other
> >> times (about 10% of tries) it's just empty. Is this a known issue with
> >Apache
> >> 2? If I use $_SERVER['PHP_SELF'], it always works fine, but still I'd
> >> like to know if this is a common bug or there's something wrong with
> >> my configuration.
> >>
> >> I'm using PHP 4.3.3 with Apache 2.0.43, Linux 2.4.21-grsec,
> >register_globals is on
>
> >This is expected behavior, always use the $_SERVER or $_ENV superglobal
> >arrays.
>
> It's expected behaviour for a language feature to fail 10% of the time?!
>
> Could you expand on your answer, or provide a link?
I believe the issue is where exactly is $PHP_SELF being used.
$PHP_SELF isn't available inside a function, without global'ing
it but $_SESSION is available all the time.
Curt
--
"My PHP key is worn out"
PHP List stats since 1997:
http://zirzow.dyndns.org/html/mlists/