From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.2.3 PHP Bug Type: Filesystem function related Bug description: file_exists() does not use include path (needs full path)
After upgrading from PHP 4.1.1 (Apache 1.3.x) to PHP 4.2.3 (Apache 2.0.42), file_exists() obviously changed its behaviour: it does no longer find files in the current directory. I need to supply the full path. I use the same php.ini, and I did not find any hints in the ChangeLog, so I presume this is a bug. The current directory '.' is in the include path, and require() as well as include() work. I am not using safe mode. Example: if(file_exists("functions.inc.php")) { include_once("functions.inc.php"); } else die ("File not found"); does not work, whereas if(file_exists(getcwd()."/functions.inc.php")) { include_once("functions.inc.php"); } else die ("File not found"); works. Note that it is not necessary to specify the full path in include_once()! Also require("functions.inc.php") would work as expected. If you should have a work around or a fix, please let me know. -- Edit bug report at http://bugs.php.net/?id=19732&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19732&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19732&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19732&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19732&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19732&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19732&r=support Expected behavior: http://bugs.php.net/fix.php?id=19732&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19732&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19732&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19732&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19732&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19732&r=dst