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:
$_ENV
<?php var_export($_ENV);
array ( )
Verification upload_tmp_dir:
upload_tmp_dir
<?php echo ini_get('upload_tmp_dir');
C:\Windows\Temp
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.
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().