#28732 [Opn]: temp and tmp environment vars not registered via web

From: Date: Thu, 10 Jun 2004 18:18:25 +0000
Subject: #28732 [Opn]: temp and tmp environment vars not registered via web
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-60745@lists.php.net to get a copy of this message
ID: 28732 User updated by: danielc at analysisandsolutions dot com Reported By: danielc at analysisandsolutions dot com Status: Open Bug Type: *General Issues Operating System: windows 2000 PHP Version: 4.3.7 New Comment: Just to be 100% clear, PHP executes via CGI on the web server. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#60745) next »