Sys_get_temp_dir () - returns C: \ Windows on windows8

In windows8, I got this with php 5.3:   

echo sys_get_temp_dir();

output:

C:\Windows

I don’t understand something or is this a mistake?

UPD

try $_ENV:

<?php

var_export($_ENV);

output:

array ( )

Verification upload_tmp_dir:

<?php

echo ini_get('upload_tmp_dir');

output:

C:\Windows\Temp
+2
source share
2 answers

Looking at the PHP source, it will call GetTempPath to determine the temp directory. According to the documentation, the Windows C: \ Windows directory is the last drop option. You should check under which user profile PHP or its host process is running, perhaps the environment needs some fixing.

+2
source

Regarding this, PHP Bug (CGI context only?).

, , apache, TEMP PHP apache (httpd.conf):

PassEnv TEMP

env_module, , "LoadModule env_module modules/mod_env.so".

PHP: sys_get_temp_dir(), tempnam().

0

All Articles