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: All +Operating System: * -PHP Version: Irrelevant +PHP Version: * Block user comment: N Private report: N New Comment: Added patch for 4.3.4 Previous Comments: ------------------------------------------------------------------------ [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