From: danielc at analysisandsolutions dot com Operating system: windows 2000 PHP version: 4.3.7 PHP Bug Type: *General Issues Bug description: temp and tmp environment vars not registered via web
Description: ------------ Neither the TEMP or TMP environment variables show up via $_ENV, $_SERVER, getenv() or phpinfo() when accessing scripts via a webserver (Apache 1.3.28). They're available when executing scripts via the command line (both CGI and CLI). FYI: C:\PROGRA~1>echo %temp% C:\TEMP C:\PROGRA~1>echo %tmp% C:\TEMP Reproduce code: --------------- <?php echo 'TEMP: ' . getenv('TEMP') . "\n"; echo 'temp: ' . getenv('temp') . "\n"; echo 'TMP: ' . getenv('TMP') . "\n"; echo 'tmp: ' . getenv('tmp') . "\n"; ?> Expected result: ---------------- TEMP: C:\TEMP temp: C:\TEMP TMP: C:\TEMP tmp: C:\TEMP Actual result: -------------- === Via web server === TEMP: temp: TMP: tmp: === Via command line === TEMP: C:\TEMP temp: C:\TEMP TMP: C:\TEMP tmp: C:\TEMP -- Edit bug report at http://bugs.php.net/?id=28732&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28732&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28732&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28732&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28732&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28732&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28732&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28732&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28732&r=support Expected behavior: http://bugs.php.net/fix.php?id=28732&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28732&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28732&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28732&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28732&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28732&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28732&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28732&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28732&r=float