#21958 [Fbk->Opn]: fopen fails in safe mode
| From: | ct at swin dot edu dot au | Date: | Fri, 31 Jan 2003 00:49:03 +0000 |
| Subject: | #21958 [Fbk->Opn]: fopen fails in safe mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-31720@lists.php.net to get a copy of this message | ||
ID: 21958
User updated by: ct@swin.edu.au
Reported By: ct@swin.edu.au
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Tru64 UNIX 5.1A
PHP Version: 4.2.3
New Comment:
With php4-STABLE-latest (200301302230) it returns the following error:
Warning: fopen() [function.fopen]: Unable to access
/web/ct/tmp/file.txt in /web/ct/test4.php on line 4
Warning: fopen(/web/ct/tmp/file.txt) [function.fopen]: failed to create
stream: No such file or directory in /web/ct/test4.php on line 4
Previous Comments:
------------------------------------------------------------------------
[2003-01-30 09:17:22] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-01-30 00:01:42] ct@swin.edu.au
PHP 4.2.3 configured in safe mode cannot create new files.
$fname = "/web/ct/tmp/file.txt";
$filePtr = fopen($fname,"w");
Warning: Unable to access /web/ct/tmp/file.txt in /web/ct/test4.php on
line 4
Warning: fopen("/web/ct/tmp/file.txt", "w") - No such file or directory
in /web/ct/test4.php on line 4
The permissions on the directory are:
drwxrwxrwx 2 root system 8192 Jan 30 16:42 tmp
If the file /web/ct/tmp/file.txt already exists, PHP can open it for
writing.
PHP 4.1.2 can successfully create files using the same configuration.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21958&edit=1