global env variables not working in php-cgi

From: Date: Mon, 16 Apr 2001 08:29:20 +0000
Subject: global env variables not working in php-cgi
Groups: php.general 
Request: Send a blank email to php-general+get-48714@lists.php.net to get a copy of this message
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

« previous php.general (#48714) next »