Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9651 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17283 invoked by uid 1010); 4 May 2004 07:55:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 17230 invoked from network); 4 May 2004 07:55:00 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 4 May 2004 07:55:00 -0000 Received: (qmail 27375 invoked from network); 4 May 2004 07:54:58 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 4 May 2004 07:54:58 -0000 Message-ID: <5.1.0.14.2.20040504105411.02706178@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 04 May 2004 10:54:54 +0300 To: "Tumurbaatar S." ,internals@lists.php.net In-Reply-To: <20040504073155.63982.qmail@pb1.pair.com> References: <20040504052554.60192.qmail@pb1.pair.com> <1083649378.20045.3.camel@linux.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] nested includes fails? From: andi@zend.com (Andi Gutmans) This does sound like a bug because it's supposed to save the translated one in the lookup table. Can you give us some more info? It sounds as if you did take a look at the code. At 04:31 PM 5/4/2004 +0900, Tumurbaatar S. wrote: >All filepaths used within require_once() are lowercase. >I use relative paths for include, depending on what directory >a file located in, my requires look like 'inc/common.php' or >'common.php' or '../inc/common.php'. And it seems that >PHP5 for Windows require() does some error on translating these >relative paths. Generally, it (PHP5) accesses these paths correctly, >but in its lookup table for includes (if such thing exists?) it stores >these paths as is. >I converted all my include param-s to absolute paths as >'c:/.../somefile.php' >and now my app works well. > > > >"Kamesh Jayachandran" wrote in message >news:1083649378.20045.3.camel@linux.local... > > Hi, > > It does not seem to happen in Linux. > > I had similar issue with Netware. > > The issue was with my script. > > The issue can be, > > In A.php you might have > > require_once("common.php"); > > In A.php you might have > > require_once("Common.Php"); > > For windows file system 'common.php', 'Common.php', 'CoMmOn.PhP' and all > > such combinations are same. > > But for PHP each one are different so it would try to load many times > > and hence the fatal error. > > > > With regards > > Kamesh Jayachandran > > > > On Tue, 2004-05-04 at 10:55, Tumurbaatar S. wrote: > > > 'common.php' contains some class definition and PHP5 fails with > > > 'PHP Fatal error: Cannot redeclare class ... in common.php...' when > > > script C.php starts. The file including map is: > > > > > > A.php: require_once(common.php) > > > B.php: require_once(common.php) > > > C.php: > > > require_once(A.php) > > > require_once(B.php) > > > > > > That is bug? When only one file is included (A or B), > > > the contents of 'common.php' is available, i.e. nested require > > > works. Only fails when nested and multiple require. > > > > > > P.S. I use PHP5 RC2 running as CGI on WinXP/IIS. > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php