What version of PHP? I ask because a few test functions aren't available on
older versions of PHP4.

Try this piece of code:

$arr = get_defined_vars();

print_r($arr);

(if that doesn't work, try print_r($GLOBALS), but be sure to hit the Stop
button on your browser, because it will print off an infinite list)

Now, look at the results. In the main listing, does it list any of the ENV
variables you are trying to access?

If not, page down a bit and look in the HTTP_SERVER_VARS array. Are the ENV
variables in there?

My guess is that they probably are. Check phpinfo() again and see what
register_globals is On. That may be your problem...

If none of the variables you seek are in HTTP_SERVER_VARS, then something is
wrong with the installation of PHP itself.



--
Plutarck
Should be working on something...
...but forgot what it was.



"Franklin Hays" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I am migrating a site to a new host (westhost.com) and having some
> issues.  PHP was compiled as a cgi instead of a module which is what I
> have always used.  This wasn't really an issue until I realized a lot of
> my scripts that depended on apaches environment variables ($REQUEST_URI,
> $HTTP_USER_AGENT, etc.) weren't working.  I can write a PERL cgi script
> and get them from the command line, they also appear in phpinfo(), yet I
> simply can't obtain them from any of my php scripts.  Maybe the cgi issue
> isn't even related but up to this point it is the only culprit I can
> find.  After spending three days going through the docs at apache,
> phpbuilder, and php.net I have not ran across anything which offers a
> solution.  Thus, I am not looking in the right place or this is a unique
> problem.  Can anyone out there help, or provide some
> directions/suggestions?  And yes, they are running Apache (note above, I
> can obtain the variables but just not through my php scripts).  Do I need
> to make an addition to my .htaccess file of some sort?
>
> I need these variables for my site to work properly ( css generation,
> hashing URL strings, etc.) so any/all help is greatly appreciated.
>
> If you need more information please let me know and I will get back to you
> as soon as possible.  At this point I can't obtain ANY of the env
> variables (SERVER_PORT, REMOTE_ADDR, REQUEST_URI, HTTP_USER_AGENT, etc.).
>
> Thanks,
> //frank
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to