Edit report at http://bugs.php.net/bug.php?id=54710&edit=1
ID: 54710 Comment by: royanee at yahoo dot com Reported by: royanee at yahoo dot com Summary: sys_get_temp_dir() does not respect upload_tmp_dir Status: Open Type: Bug Package: PHP options/info functions PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Additionally, enabling open_basedir results in FALSE and triggers the following warning: PHP Warning: tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/www/myvhost/) Previous Comments: ------------------------------------------------------------------------ [2011-05-11 15:45:07] royanee at yahoo dot com Description: ------------ The only configuration option for setting the temporary directory for normal operations is the upload_tmp_dir option. As such, functions that rely on the temporary directory should respect the upload_tmp_dir option to ensure that true separation of concerns between virtual hosts can be achieved. This is particularly important when also using open_basedir. Note that the following line is correctly located in the vhost config: php_admin_value upload_tmp_dir "/www/myvhost/tmp" Test script: --------------- <?php // Create a temporary file in the temporary // files directory using sys_get_temp_dir() $temp_file = tempnam(sys_get_temp_dir(), 'Tux'); echo $temp_file; ?> Expected result: ---------------- /www/myvhost/tmp/TuxDRhRIg Actual result: -------------- /tmp/TuxDRhRIg ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54710&edit=1