Req #60524 [Opn->Csd]: specify temp dir by php.ini
Edit report at https://bugs.php.net/bug.php?id=60524&edit=1
ID: 60524
Updated by: stas@php.net
Reported by: mail+bugs dot php dot net at kazik dot de
Summary: specify temp dir by php.ini
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Filesystem function related
Operating System: *
PHP Version: *
-Assigned To:
+Assigned To: stas
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
merged into 5.5 as 475a644bd84c071da04b4272b829a187a2c6d282
Previous Comments:
------------------------------------------------------------------------
[2012-05-10 15:27:56] mail+bugs dot php dot net at kazik dot de
Added patch for 5.3.4, of course (and not 4.3.4)
------------------------------------------------------------------------
[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)