#42570 [Opn->Fbk]: require not finding files that are within filesystem
| From: | jani@php.net | Date: | Thu, 06 Sep 2007 10:58:57 +0000 |
| Subject: | #42570 [Opn->Fbk]: require not finding files that are within filesystem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-117218@lists.php.net to get a copy of this message | ||
ID: 42570
Updated by: jani@php.net
Reported By: development at domain51 dot com
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: Mac OS X 10.4
PHP Version: 5.2.4
New Comment:
What did you set include_path to be? And where are the files
located..?
(it's not very clear now..)
Previous Comments:
------------------------------------------------------------------------
[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