Req #60524 [Opn]: specify temp dir by php.ini
Edit report at https://bugs.php.net/bug.php?id=60524&edit=1
ID: 60524
User updated by: mail+bugs dot php dot net at kazik dot de
Reported by: mail+bugs dot php dot net at kazik dot de
Summary: specify temp dir by php.ini
Status: Open
Type: Feature/Change Request
Package: Filesystem function related
Operating System: *
PHP Version: *
Block user comment: N
Private report: N
New Comment:
Added patch for 5.3.4, of course (and not 4.3.4)
Previous Comments:
------------------------------------------------------------------------
[2012-05-10 15:25:59] mail+bugs dot php dot net at kazik dot de
Added patch for 4.3.4
------------------------------------------------------------------------
[2011-12-14 14:33:53] mail+bugs dot php dot net at kazik dot de
Description:
------------
This patch (against 5.3.8) adds a new php.ini directive to specify the path for the temporary files.
Why:
If, for security reasons, every user is only allowed to use their own home directories, it's
not possible to specify their own tmp dir (e.g. "/home/user/tmp"). The directory for
uploading and session can already be specified. Since all users may use the same php.ini (different
[HOST=domain] entries, [1]) it's not possible to set the environment TMPDIR variable, because
it would affect all users.
[1] http://php.net/manual/en/ini.sections.php
Test script:
---------------
ini: system_tmp_dir = "/home/user/tmp"
php: var_export(sys_get_temp_dir());
Expected result:
----------------
'/home/user/tmp'
Actual result:
--------------
'/tmp' (depends on system configuration)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60524&edit=1
Thread (6 messages)