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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri May 17 21:01:33 2024 UTC