From:             development at domain51 dot com
Operating system: Mac OS X 10.4
PHP version:      5.2.4
PHP Bug Type:     Filesystem function related
Bug description:  require_once not finding files that are within filesystem

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 bug report at http://bugs.php.net/?id=42570&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42570&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42570&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42570&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42570&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42570&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42570&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42570&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42570&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42570&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42570&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42570&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42570&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42570&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42570&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42570&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42570&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42570&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42570&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42570&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42570&r=mysqlcfg

Reply via email to