LostProgrammer Posted April 18, 2009 Share Posted April 18, 2009 Hey all, I hope someone can help me here. I've recently integrated a third party CGI script into a website I was developing. After a few little initial bumps I got eveything up and running but there is a problem on my local testing environment - the $_ENV array is always empty. Locally I'm running Windows Vista with PHP 5 and Apache 2.2. Everything else works and I have global_vars switched off (have read in a few places that can cause issues). I've done a test on the production server which is running similar software versions but on Linux and I can print the $_ENV array without a problem. Does anyone know what might be causing it? When I check to see if putenv() succeeds it returns true. My _POST, _GET, _SERVER arrays are all good. Oh I should explain this Perl script requires environment variables for authentication purposes. Any help would be greatly appreciated as I would prefer to avoid having to test on the production server if I can. Thanks Lost! Link to comment https://forums.phpfreaks.com/topic/154590-empty-_env-array/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 18, 2009 Share Posted April 18, 2009 You need to add an E to the following php.ini setting (stop and start your web server to get any change made to php.ini to take effect.) Change this - variables_order = "GPCS" To this - variables_order = "GPCSE" Link to comment https://forums.phpfreaks.com/topic/154590-empty-_env-array/#findComment-812928 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.