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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
42 - 12 = ?
Subscribe to this entry?

 
 [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: Sat Jun 01 18:01:28 2024 UTC