ID: 21674 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: *URL Functions Operating System: Cobalt RAQ4 Apache/Linux PHP Version: 4.3.0 New Comment:
The point of asking for var_dump(ini_get('include_path')); is so you'll show the output of it. This is a form of debugging. The problem has to do with the include_path directive. Now we're trying to figure out why/where it gets set to '' before doing some of these includes as this seems to be the case. So, whenever you get this error: Warning: main() [function.main]: Failed opening 'foo.php'... Add this line above the include: var_dump(array(ini_get('include_path'),__LINE__,__FILE)); This way we'll know some useful information. Basically put this line above EVERY one of these failed includes, such as the inclusion config.php, extra.php, and lang.php. Please do this and show the output in your next reply. Btw, I modified Wez's debug dump a little so we can be a little more specific :) Also, be 100% sure you are not setting this directive in either httpd.conf or .htaccess. Previous Comments: ------------------------------------------------------------------------ [2003-01-22 10:38:48] [EMAIL PROTECTED] Hello Wez: Not it does not look like that. I was asked to include var_dump(ini_get('include_path')); before the require_once statement in the primary script, phpbug21674.php Remember there are two scripts located in different paths representing two different virtual domains. /home/site3/phpbug21674.php (contains a require_once ("/home/sites/site2/web/IV/config.php"); and /home/sites/site2/web/IV/config.php" ---> contains include_once ('lang.php'); include ('extras.php'); However, I did go back and also added the var_dump to config.php to reflect as follows: var_dump(ini_get('include_path')); include_once ('lang.php'); include ('extras.php'); Results: Same results = Failed to create stream: Again, this script worked fine on PHP 4.1.2 Now it seems to get it to work, I have to reference the absolute path. ------------------------------------------------------------------------ [2003-01-22 05:00:55] [EMAIL PROTECTED] Just to be extra sure: in config.php, do lines 97 and 98 look like this: var_dump(ini_get('include_path')); include ('extras.php'); If not, please make sure they do and report back. If they do, then something really strange is going on. ------------------------------------------------------------------------ [2003-01-21 22:52:29] [EMAIL PROTECTED] Hello PHP.NET: So is this bug a stream related 4.3.0 bug or not? ------------------------------------------------------------------------ [2003-01-18 02:31:51] [EMAIL PROTECTED] Did you try ? : chown o+r / /home /home/sites \ /home/sites/site2 \ /home/sites/site2/web \ /home/sites/site2/web/IV Up to 4.2.3 "x" permission is need on ALL directories to the include. Since 4.3.0 "rx" permissions are required. Don't know why. Cordialy. ------------------------------------------------------------------------ [2003-01-17 15:59:32] [EMAIL PROTECTED] You did not ask me to place above line that include fails. You asked me to place above require_once in the config.php file. That I can confirm. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/21674 -- Edit this bug report at http://bugs.php.net/?id=21674&edit=1