#30681 [Opn->Bgs]: include() not including chained include() files

From: Date: Thu, 04 Nov 2004 07:10:02 +0000
Subject: #30681 [Opn->Bgs]: include() not including chained include() files
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68673@lists.php.net to get a copy of this message
ID: 30681 Updated by: tony2001@php.net Reported By: php at healthfleet dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux/WinXP PHP Version: 4.3.9 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Add "/includes/" to your include_path. Previous Comments: ------------------------------------------------------------------------ [2004-11-04 00:11:57] php at healthfleet dot com 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 this bug report at http://bugs.php.net/?id=30681&edit=1

« previous php.bugs (#68673) next »