ID: 28732 Comment by: D dot Kingma at jool dot nl Reported By: danielc at analysisandsolutions dot com Status: Open Bug Type: *General Issues Operating System: windows 2000 PHP Version: 4.3.7 New Comment:
Works fine here. Maybe nothing set in your php.ini? PHP version: php4-win32-STABLE-200406102030 OS: winXP Results of reproduction code: TEMP: C:\WINDOWS\TEMP temp: C:\WINDOWS\TEMP TMP: C:\WINDOWS\TEMP tmp: C:\WINDOWS\TEMP Previous Comments: ------------------------------------------------------------------------ [2004-06-10 20:18:25] danielc at analysisandsolutions dot com Just to be 100% clear, PHP executes via CGI on the web server. ------------------------------------------------------------------------ [2004-06-10 20:16:21] danielc at analysisandsolutions dot com 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 this bug report at http://bugs.php.net/?id=28732&edit=1