ID:               42570
 User updated by:  development at domain51 dot com
 Reported By:      development at domain51 dot com
 Status:           Open
 Bug Type:         Filesystem function related
 Operating System: Mac OS X 10.4
 PHP Version:      5.2.4
 New Comment:

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


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to