#30681 [NEW]: include() not including chained include() files
| From: | php at healthfleet dot com | Date: | Wed, 03 Nov 2004 23:12:04 +0000 |
| Subject: | #30681 [NEW]: include() not including chained include() files | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-68667@lists.php.net to get a copy of this message | ||
From: php at healthfleet dot com
Operating system: Linux/WinXP
PHP version: 4.3.9
PHP Bug Type: Unknown/Other Function
Bug description: include() not including chained include() files
Description:
------------
Ok, I have found a couple of spots mentioning this, including here. But no
solid answer.
This code works fine on 2 WinXP boxes, 1 RH linux box, and another misc
linux (I think also RH). So I'm thinking this isn't a relative position
issue.
However it does not work on a custom Web Server Application box (aka
Cobalt RaQ 550).
Reproduce code:
---------------
Here is the senerio:
DOCUMENT_ROOT: /home/.sites/143/site2/web/
SitePath of index.php: /modules/adminpanel/
SitePath of privileges.php: /modules/adminpanel/
SitePath of fleet_functions.php: /includes/
SitePath of fleetdb.php: /includes/
File1: index.php
<?
$myRoot = $_SERVER['DOCUMENT_ROOT'];
include("privileges.php");
?>
File2: privileges.php
<?
include_once("$myRoot/includes/fleet_functions.php");
?>
File3: fleet_functions.php
<?
include("fleetdb.php");
?>
Expected result:
----------------
I expected all the files to be included like they have on my local box
testing and server testing. This is something unique about my new
development test server.
Actual result:
--------------
I get an error message on the fleet_functions.php file:
Warning: main(fleetdb.php): failed to open stream: No such file or
directory in /home/.sites/143/site2/web/includes/fleet_functions.php on
line 2
Warning: main(): Failed opening 'fleetdb.php' for inclusion
(include_path='') in
/home/.sites/143/site2/web/includes/fleet_functions.php on line 2
--
Edit bug report at http://bugs.php.net/?id=30681&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30681&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30681&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30681&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30681&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30681&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30681&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30681&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30681&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30681&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30681&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30681&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30681&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30681&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30681&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30681&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30681&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30681&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30681&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30681&r=mysqlcfg