Bug #7842 Updated: doc_root setting behavior is wrong

From: Date: Tue, 08 Jan 2002 13:17:39 +0000
Subject: Bug #7842 Updated: doc_root setting behavior is wrong
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76258@lists.php.net to get a copy of this message
ID: 7842 Updated by: sander Reported By: jim@perigee.net Old Status: Open Status: Closed Bug Type: PHP options/info functions Operating System: Linux PHP Version: 4.0.3pl1 New Comment: This is not a bug, just a change of behaviour, which is IMO much more logical and more clear than the old behaviour. Use open_basedir to restrict access to directories. include("/script.php") refers to the absolute path /script.php (the file script.php under the root) Previous Comments: ------------------------------------------------------------------------ [2000-11-16 10:15:38] jim@perigee.net doc_root string - PHP's "root directory" on the server. If PHP is configured with safe mode, no files outside this directory are served. -- Why does php 4 handle this so differently than 3 did, especially when it comes to referencing file locations like when including files? I have had to resort to using either "../" or $HTTP_SERVER_VARS['DOCUMENT_ROOT'] to access included files in PHP4 when before I used to be able to use /name.php notation to absolutely refer to the include files within the web site doc_root directory. We are running PHP in SAFE MODE. I think this may just be an oversight, but, if not, I would love an explanation of the rationale. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=7842&edit=1

« previous php.dev (#76258) next »