doc_root solution

From: Date: Sat, 16 Sep 2000 20:29:13 +0000
Subject: doc_root solution
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-33334@lists.php.net to get a copy of this message
OK, I am commiting a patch which should fix the doc_root problem. We do have to fix our documentation because it mislead me and probably others. ---- doc_root string PHP's "root directory" on the server. Only used if non-empty. If PHP is configured with safe mode, no files outside this directory are served. ---- This should be changed to something like: doc_root string
        PHP's "root directory" on the server. Only used if non-empty and PHP is in CGI  or Java servlet mode." PHP will open the main script according to doc_root and  PATH_INFO and not PATH_TRANSLATED.
(Side note: This really has nothing to do with safe mode, safe_mode really means that permissions are checked). In order to limit which files can/can't be open by PHP,open_basedir should be used. doc_root just calculates the initial scripts location when the main script is opened for CGI. open_basedir checks every file which is opened (at least what the scripting engine opens) and makes sure it's not outside of the specified directory tree. Again, I'm not sure how well this works right now although I have cleaned up the code a lot but there might be glitches here and there. I'm cc'ing Egon so that he can make the documentation changes and Sam Ruby to find out why servlets use php_fopen_primary_script(). Are they like CGI's? I can't commit my patch right now because the CVS is down but I'll do it later on when the machine hopefully comes back to life. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.dev (#33334) next »