Bug #54710 [NEW]: sys_get_temp_dir() does not respect upload_tmp_dir
From:
Operating system:
PHP version: 5.3.6
Package: PHP options/info functions
Bug Type: Bug
Bug description:sys_get_temp_dir() does not respect upload_tmp_dir
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 bug report at http://bugs.php.net/bug.php?id=54710&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54710&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54710&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54710&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54710&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54710&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54710&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54710&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54710&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54710&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54710&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54710&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54710&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54710&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54710&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54710&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54710&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54710&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54710&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54710&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54710&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54710&r=mysqlcfg
Thread (5 messages)
- royanee at yahoo dot com