ID: 42560
Comment by: mb at smartftp dot com
Reported By: Bjorn dot Wiberg at its dot uu dot se
Status: Open
Bug Type: Directory function related
Operating System: IBM AIX 5.3 5300-05-06
PHP Version: 5.2.4
New Comment:
Same problem on Windows 2003 with Apache.
Previous Comments:
------------------------------------------------------------------------
[2007-09-05 11:59:34] Bjorn dot Wiberg at its dot uu dot se
Description:
------------
If open_basedir is used -- even if it includes /tmp among its
directories -- calling tempnam() with an empty string as the first
(directory) argument does not make PHP fall back to "the system default"
as http://se.php.net/manual/en/function.tempnam.php
specifies.
Reproduce code:
---------------
// open_basedir:
.:/apache/php/lib:/tmp:/usr/local/bin:/usr/local/etc/Counter/data:/apache/htdocs/webdev-its
tempnam('', 'test');
Expected result:
----------------
No errors, temporary file gets created in /tmp or whatever the fallback
is.
Actual result:
--------------
From the Apache error log:
Warning: tempnam(): open_basedir restriction in effect. File() is not
within the allowed path(s):
(.:/apache/php/lib:/tmp:/usr/local/bin:/usr/local/etc/Counter/data:/apache/htdocs/webdev-its)
in
/apache/htdocs/webdev-its/limesurvey/admin/classes/pear/OLE/PPS/File.php
on line 87
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42560&edit=1