#21540 [Com]: include_path problem

From: Date: Thu, 17 Apr 2003 09:40:03 +0000
Subject: #21540 [Com]: include_path problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37799@lists.php.net to get a copy of this message
ID: 21540 Comment by: russell+php dot net at loosenut dot com Reported By: kjanisz at fr dot pl Status: No Feedback Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.3.0 New Comment: I'll stop spamming on this, but... here are the error messages that the two above files generate (Apache 1.3.27): -- begin [Thu Apr 17 02:38:11 2003] [error] PHP Warning: main(./file.php) [<a href='http://www.php.net/function.main'>function.main</a>]: failed to open stream: No such file or directory in /export/home/russell/public_html/inc-problem/index.php on line 18 [Thu Apr 17 02:38:11 2003] [error] PHP Warning: main() [<a href='http://www.php.net/function.include'>function.include</a>]: Failed opening './file.php' for inclusion (include_path='.:/usr/local/php-4.3.2rc1/lib/php') in /export/home/russell/public_html/inc-problem/index.php on line 18 -- end Previous Comments: ------------------------------------------------------------------------ [2003-04-17 04:33:56] russell+php dot net at loosenut dot com Sorry... that's PHP 4.3.2 RC 1. Not PHP 4.3.1 RC 1. Still b0rked there, unless there's an easy workaround. ------------------------------------------------------------------------ [2003-04-17 04:31:04] russell+php dot net at loosenut dot com It would appear as though PHP 4.3.1 RC1 is also with this problem (running on Solaris, here). It appears as though PHP doesn't like the "./" prepended to the filename in the "include" or "require" statement (though earlier versions of PHP (4.1.2 for example) work without a problem with these same scripts). According to "phpinfo();" run on the server in this same directory, I have: Directive: include_path Local Value: .:/usr/local/php-4.3.2rc1/lib/php Master Value: .:/usr/local/php-4.3.2rc1/lib/php Safe mode is also off. Test case: -- begin <HTML> <HEAD> <TITLE>PHP Test Case</TITLE> </HEAD> <BODY> <P> Testing: <?PHP // index.php print( "Including file:<BR>\n" ); include( "file.php" ); print( "Including file with dot-slash:<BR>\n" ); include( "./file.php" ); ?> </BODY> </HTML> -- end -- begin <?PHP // file.php print( "<B>File Successfully Included</B><BR>\n" ); ?> -- end ------------------------------------------------------------------------ [2003-02-17 21:44:30] pro_link83 at yahoo dot com but in my case is Warning: Failed opening 'config.inc.php' for inclusion (include_path='.:/usr/share/pear') in /home/httpd/html/services/admin/detil.php on line 2 there is no ":" or ";" in the end of include_path i dont know the way out of this, can you help me? ------------------------------------------------------------------------ [2003-02-07 17:15:09] georgep at phaistosnetworks dot gr Hello, Using linux and the php 4.3.0 causes the same problems. For some reason php seems to ingore the path_info set in php.ini. ------------------------------------------------------------------------ [2003-01-31 13:47:00] sniper@php.net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ 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/21540 -- Edit this bug report at http://bugs.php.net/?id=21540&edit=1

« previous php.bugs (#37799) next »