php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23317 fopen and touch fail in safe_mode
Submitted: 2003-04-23 10:23 UTC Modified: 2003-04-23 11:01 UTC
From: patrick_cossette1 at uqtr dot ca Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.1 OS: AIX 4.3.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: patrick_cossette1 at uqtr dot ca
New email:
PHP Version: OS:

 

 [2003-04-23 10:23 UTC] patrick_cossette1 at uqtr dot ca
This is be similiar to bug #21958 but not the same OS and not the same PHP version.

With AIX 4.3.3 and PHP 4.3.1.

With safe_mode on , I cannot create a file with neither touch nor fopen nor mkdir. (With safe_mode off, the creation works).

Apache is running under user "web" and group "web".
I have the directory /web/hee_dev whose owner is web.web with permissions rwxr-s---

I have the script testing.php located in that directory:

   <?
     $fp=fopen("filetocreate","w+");
   ?>

If the file "filetocreate" does not already exist, I get the following error while executing the script:
 
           Warning: Unable to access filetocreate  
           in /web/hee_dev/testing.php on line 2

           Warning: fopen("filetocreate", "w+") - No such 
           file or directory in /web/hee_dev/testing.php on 
           line 2

If the file already exists, I can open it without any problem.

I had read somewhere in the bug database that this should be solved by now, but with 4.3.1, it still produces this error.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-23 11:01 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Just add your comments in bug #21958

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Aug 09 18:34:40 2020 UTC