[PATCH] include file when using open_basedir

From: Date: Sun, 23 Feb 2003 21:51:48 +0000
Subject: [PATCH] include file when using open_basedir
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-94513@lists.php.net to get a copy of this message
Hi !! Including or openeing a file fails when all paths defined in include_path are not also defined in open_basedir, regardless if the file to open/include is in both definitions. Imagine include_path = .:/usr/local/lib/php:/usr/local/http-docs open_basedir = .:/usr/local/http-docs trying to include a file on /usr/local/http-docs will fail when _php_stream_fopen_with_path will try to locate the file at usr/local/lib/php . This could be undestand as a configuration error, but in a virtual server farm enviroment it's easy to have include_path defined globaly in php.ini and open_basedir defined for each virtual server. BTW, it's not too good to fail in this situation as the requested file meets all requirements. Also the given error will report 'unable to open /usr/local/lib/php/filename' due to open_basedir restrictions, where the real requested file is /usr/local/http-docs/filename -- Best regards ... I was arrested for selling illegal sized paper. ---------------------------------------------------------------- David Saez Padros http://www.ols.es On-Line Services 2000 S.L. e-mail david@ols.es Pintor Vayreda 1 telf +34 902 50 29 75 08184 Palau-Solita i Plegamans movil +34 670 35 27 53 ----------------------------------------------------------------

« previous php.dev (#94513) next »