php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16208 open_basedir: does not expand Variables before checking paths
Submitted: 2002-03-21 13:55 UTC Modified: 2005-01-31 23:19 UTC
From: php4 at Ncc-1701 dot b dot shuttle dot DE Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.1.2 OS: GNU/Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php4 at Ncc-1701 dot b dot shuttle dot DE
New email:
PHP Version: OS:

 

 [2002-03-21 13:55 UTC] php4 at Ncc-1701 dot b dot shuttle dot DE
Constructs like 

<? require "$DOCUMENT_ROOT/head.php";?>

will cause a bogus error 

"PHP Warning:  open_basedir restriction in effect. File is in wrong directory in [...]"

replacing $DOCUMENT_ROOT with the actual directory name works fine but is braindamaged to use.

BTW this may also apply to other options like safe_mode_exec_dir.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-25 02:49 UTC] php4 at Ncc-1701 dot b dot shuttle dot DE
Sorry, I forgot that I had to access $DOCUMENT_ROOT as $_SERVER["DOCUMENT_ROOT"] now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC