php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39113 general tmpdir directive
Submitted: 2006-10-10 12:43 UTC Modified: 2013-07-18 15:06 UTC
Votes:18
Avg. Score:4.9 ± 0.2
Reproduced:13 of 13 (100.0%)
Same Version:12 (92.3%)
Same OS:3 (23.1%)
From: manuel at mausz dot at Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.4.4 OS: Linux
Private report: No CVE-ID: None
 [2006-10-10 12:43 UTC] manuel at mausz dot at
Description:
------------
Regarding http://bugs.php.net/bug.php?id=38963.

Many php functions (e.g. ftp_nlist) require the creation of a temporary file. As there is no ini setting for a temp-directory, php tries to use TMPDIR from environment or falls back to P_tmpdir and /tmp. In most web setups /tmp isn't included in open_basedir and P_tmpdir not even defined. Thus such functions fails.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-11 11:28 UTC] manuel at mausz dot at
Hmm. Any ideas/comments on this?
 [2006-10-16 07:55 UTC] manuel at mausz dot at
Same problem for tmpfile() which also has no temp-dir argument.

So the only way to solve this is either define P_tmpdir or set TMPDIR in environment?
 [2006-10-16 10:30 UTC] youza at post dot cz
See this bugs - the similiar problem in my opinion afected 
other functions.

http://bugs.php.net/bug.php?id=37236
http://bugs.php.net/bug.php?id=38934

Yes - the  goot  solution is  the new "super directive"
"global_php_temp_dir" ( or other )  this settings  automatically addes fo the  "local" directives - example for
open_basedir - apache config:

php_admin_value global_open_basedir = /xxxx

<Virtual ....>
php_admin_value open_basedir  /my/openbasedir
..
</Virtual..>

the result:
  open_basedir = /xxxx:/my/openbasedir

etc....
 [2013-07-18 15:06 UTC] manuel at mausz dot at
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues
 [2013-07-18 15:06 UTC] manuel at mausz dot at
see #60524
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 03 16:01:29 2025 UTC