[nycphp-talk] IIS: $_SERVER & referer
Hans Zaunere
zaunere at yahoo.com
Mon May 12 20:08:39 EDT 2003
--- "Emmanuel. M. Decarie" <emm at scriptdigital.com> wrote:
>
> Hello Hans,
>
> >What about getenv('PHP_SELF');
>
> Didn't think of this, but its not working too.
>
> > or print_r($_SERVER); or var_dump($_SERVER);
> >any sign of PHP_SELF?
>
> Nope, I have tried all that, and it always return an empty array.
>
> > > I can ask the client to make modifications to the server php.ini and
> >> I was wondering if there is something to do there.
> >>
> >> I had a look here, but don't see any answers.
> >>
>
><http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server>
> >
> >Perhaps a variables_order issue?
>
> Hmm, not sure I understand what you are saying here. Do you mean
> that I have to add 'E' to the variables_order. Is the environment is
> somehow related? The PHP says that its better not to set 'E' for
> optimal performance.
Ahh, my mistake; I was leaning towards 'S'
If I remember correctly from your phpinfo output, variables_order was set
only to GPC. Give GPCS a shot, which may at least get a bit closer to
resolving why $_SERVER is empty.
> > > The CGI Environment Variables defined on the following page doesn't
> >> seems to list a way to get the referer so I don't see how I could use
> >> getenv for that.
> >> <http://hoohoo.ncsa.uiuc.edu/cgi/env.html>
> >
> >The referer should be set; that is if the browser sent it previously. I'm
> on
> >shakey ground here with IIS, but perhaps an upgrade of PHP (especially
> >concerning IIS, as I think there's been a lot of improvements in the
> >multithreaded environments). A check that IIS isn't configured strangely,
> >too?
>
> Well, I think an upgrade of PHP is out of the question. I don't have
> any control on the server, and the sysop is extra cautious. And for
> IIS, I don't know what to say because my knowledge of this beast is
> almost zero. I wish they ran PHP on Linux or FreeBSD.
Don't we all :)
But it may be worth pushing for it a bit; older PHP on Windows (especially
under IIS) is typically a Bad Thing from what I hear, but as you mentioned,
IIS is uncharted terroritory for me as well.
Best of luck,
H
More information about the talk
mailing list