ID: 30416 Updated by: [EMAIL PROTECTED] Reported By: Severn at dreamfusion dot net -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.0.2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php PHP CLI doesn't change it's working directory like other sapis. Previous Comments: ------------------------------------------------------------------------ [2004-10-13 00:25:19] Severn at dreamfusion dot net Description: ------------ May be related to bug #29949, #28338, #9673 When using the php cli, relative paths are not relative to the script, but relative to where the cli was started Notes: -No include_path is set in php.ini -Works as expected in PHP 4.3.8 (cgi) -Works as expected when PHP is an Apache module Reproduce code: --------------- /inc/a.php <?php include('../b.php'); ?> /b.php <?php echo 'boo'; ?> cd / php inc/a.php Expected result: ---------------- boo Actual result: -------------- PHP Warning: main(../b.php): failed to open stream: No such file or directory in /inc/a.php on line 1 PHP Warning: main(): Failed opening '../b.php' for inclusion (include_path='.:/usr/lib/php') in /inc/a.php on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30416&edit=1
