From: tomas at matfyz dot cz Operating system: Linux PHP version: 5.2.7 PHP Bug Type: *General Issues Bug description: include() searches wrong directory according to the doc
Description: ------------ In the documentation (http://cz.php.net/manual/en/function.include.php) is the following statement: "... E.g. if your include_path is libraries, current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in /www/libraries/ and then in /www/include/. ..." This is not true. There is either a bug in the documentation or in the PHP. Tested on 5.2.0-8+etch11. Reproduce code: --------------- Please see http://artax.karlin.mff.cuni.cz/~ttel5535/obs/pok_require_dirs3/report/www/use.php . The source code is in multiple directories, you can download it from there. Expected result: ---------------- www/include/a.php: fun_a() www/include/b.php: fun_b() Actual result: -------------- www/include/a.php: fun_a() www/b.php: fun_b() According to the documentation, the file www/include/b.php should be included! -- Edit bug report at http://bugs.php.net/?id=46801&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46801&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46801&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46801&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46801&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46801&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46801&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46801&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46801&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46801&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46801&r=support Expected behavior: http://bugs.php.net/fix.php?id=46801&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46801&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46801&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46801&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46801&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46801&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46801&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46801&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46801&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46801&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46801&r=mysqlcfg