php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #592 show_source problems in SAFE_MODE
Submitted: 1998-07-28 19:57 UTC Modified: 1998-09-19 15:54 UTC
From: daniele at orlandi dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.2a OS: RedHat Linux 5.1, Kernel 2.0.35
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: daniele at orlandi dot com
New email:
PHP Version: OS:

 

 [1998-07-28 19:57 UTC] daniele at orlandi dot com
I'm trying to mirror php3 web site, all works fine, except for the "Source" button in pages outside the root directory.
It seems that calling show_source with an absolute pathname conflicts with safe_mode.

This is the result of calling show_source("/mystuff/news.php3") and show_source("/www/www.xt.net/htdocs/mystuff/news.php3") from a file called /www/www.xt.net/htdocs/query_telecom.php3

Warning: SAFE MODE Restriction in effect. Invalid owner. in /www/www.xt.net/htdocs/query_telecom.php3 on line 11
Fatal error: Failed opening required '/mystuff/news.php3' in /www/www.xt.net/htdocs/query_telecom.php3 on line 11

Warning: SAFE MODE Restriction in effect. Invalid owner. in /www/www.xt.net/htdocs/query_telecom.php3 on line 11
Fatal error: Failed opening required '/www/www.xt.net/htdocs/mystuff/news.php3' in /www/www.xt.net/htdocs/query_telecom.php3 on line 11

Calling show_source("mystuff/news.php3") or show_source("query_telecom.php3") works fine.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-09-19 15:54 UTC] rasmus
You are probably confusing your web server's document root and your system's document root.  Try editing your php3.ini file and set doc_root to your web server's document root.  safe_mode uses this setting.  The error messages have been fixed and are more descriptive as of 3.0.4, so try it again with that version (when it is available) and let us know.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 22:01:29 2024 UTC