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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 04:01:33 2025 UTC