php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24775 safe_mode, include, safe_mode_include_dir
Submitted: 2003-07-23 14:13 UTC Modified: 2003-07-23 14:21 UTC
From: drg at infomex dot pl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.2 OS: Linux 2.4.20
Private report: No CVE-ID: None
 [2003-07-23 14:13 UTC] drg at infomex dot pl
Description:
------------
When:
safe_mode=On 
safe_mode_include_dir=

fp=fopen("/file/not/owned/be/me") fail, but include("/file/not/owned/be/me") work fine. 

When:
safe_mode=On
safe_mode_include_dir=/tmp (examply)

then 
include("/file/not/owned/be/me") fail.

I think, that when safe_mode=On and safe_mode_include_dir is not set, include("/file/not/owned/be/me") should fail too, as well as fopen("/file/not/owned/be/me");




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-23 14:21 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 21 17:00:03 2025 UTC