ID: 42570 User updated by: development at domain51 dot com Reported By: development at domain51 dot com -Status: Feedback +Status: Open Bug Type: Filesystem function related Operating System: Mac OS X 10.4 PHP Version: 5.2.4 New Comment:
Sorry for not being more explicit. The include_path is not touched during this execution and is left as it is compiled from the base. In this case, the Mac's include_path is set to "/path/to/php" where the PEAR files are stored without the "./:" at the beginning as is the normal php.ini file setup. Properly setting the include_path does handle this, though for some reason I had it in my head that the current working path was always prepended to the include_path. Feel free to mark as bogus... Previous Comments: ------------------------------------------------------------------------ [2007-09-06 10:58:57] [EMAIL PROTECTED] What did you set include_path to be? And where are the files located..? (it's not very clear now..) ------------------------------------------------------------------------ [2007-09-05 19:10:54] development at domain51 dot com I just attempted this code on a Linux (Ubuntu Feisty Fawn, Server) and did not receive the warning/fatal error. Copying that code back to my Mac OS X box, the code did have the same error. This appears to be OS X related. The code to reproduce is available from: http://plumb.domain51.com/sandbox/bug42570.tar.bz2 ------------------------------------------------------------------------ [2007-09-05 19:02:45] development at domain51 dot com Description: ------------ When including/requiring file within the scripts path, it does not pay attention to the original scripts path. file_exists() and is_readable() will return true, but require/include will produce an error. Reproduce code: --------------- <?php // base-file.php require 'include/some-file.php'; ?> <?php // include/some-file.php require 'file-that-exists.php'; ?> <?php // file-that-exists.php echo "Hello, I exist"; ?> Expected result: ---------------- Hello, I exist Actual result: -------------- Warning: include(file-that-exists.php) [function.include]: failed to open stream: No such file or directory in /path/to/some-file.php on line 3 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42570&edit=1