From: info at vlantana dot lt
Operating system: Windows XP
PHP version: 5.2.6
PHP Bug Type: *General Issues
Bug description: Include() do not working from command line
Description:
------------
Hello
I upgrade server and PHP from 4.1 to 5.26.
The script with include(../scripts.php) files on webpage is working OK.
But the same script from command line doesn't work.
As i understood from command line there has to be absolute path, like
c:/directory/script.
On version 4.1 I used relative path.
Reproduce code:
---------------
<?
ini_set('display_errors', 1);
error_reporting(E_ALL);
include'../vl_web/vl_conn.php';
?>
Expected result:
----------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\PHP>c:\php\php.exe -q c:\web\tmp\in.php
#C:\PHP#PHP Warning: include(../vl_web/vl_conn.php): failed to open
stream: No
such file or directory in C:\web\tmp\in.php on line 6
Warning: include(../vl_web/vl_conn.php): failed to open stream: No such
file or
directory in C:\web\tmp\in.php on line 6
PHP Warning: include(): Failed opening '../vl_web/vl_conn.php' for
inclusion (i
nclude_path='.;C:\php5\pear') in C:\web\tmp\in.php on line 6
Warning: include(): Failed opening '../vl_web/vl_conn.php' for inclusion
(includ
e_path='.;C:\php5\pear') in C:\web\tmp\in.php on line 6
C:\PHP>
--
Edit bug report at http://bugs.php.net/?id=46431&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46431&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46431&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46431&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46431&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=46431&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46431&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=46431&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=46431&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=46431&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=46431&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=46431&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46431&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46431&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46431&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46431&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46431&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=46431&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=46431&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=46431&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=46431&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=46431&r=mysqlcfg