Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9660 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87411 invoked by uid 1010); 4 May 2004 13:44:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87364 invoked from network); 4 May 2004 13:44:11 -0000 Received: from unknown (HELO mta202-rme.xtra.co.nz) (210.86.15.145) by pb1.pair.com with SMTP; 4 May 2004 13:44:11 -0000 Received: from web1-rme.xtra.co.nz ([210.86.15.141]) by mta202-rme.xtra.co.nz with ESMTP id <20040504134410.CMVJ6167.mta202-rme.xtra.co.nz@web1-rme.xtra.co.nz>; Wed, 5 May 2004 01:44:10 +1200 Received: from galaxy ([219.89.128.128]) by web1-rme.xtra.co.nz with ESMTP id <20040504134404.UEDS13634.web1-rme.xtra.co.nz@galaxy>; Wed, 5 May 2004 01:44:04 +1200 Message-ID: <04c101c431dd$f85e4e80$0a00a8c0@home.jevon.org> To: "Andi Gutmans" , References: <20040504052554.60192.qmail@pb1.pair.com> <5.1.0.14.2.20040504145025.02839008@127.0.0.1> Date: Wed, 5 May 2004 01:44:48 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: [PHP-DEV] nested includes fails? From: jevon@jevon.org ("Jevon Wright") Sorry for the delay... I didn't quite understand the problem, but I've tried to reproduce it: ----- \inc\a.php \inc\b.php \inc\common.php \inc\member.php \inc\foo.php ----- \member\member.php \member\member2.php \member\member3.php ----- I can access \member.php, \member2.php and \member3.php all fine with no errors. Perhaps you've got a "common.php" in the \member directory? Because require_once("common.php") will use *that* common.php instead (and not the one in \inc\). Jevon ----- Original Message ----- From: "Andi Gutmans" To: "Jevon Wright" ; "Tumurbaatar S." ; Sent: Tuesday, May 04, 2004 11:50 PM Subject: Re: [PHP-DEV] nested includes fails? > Can you give it a try with relative patches the way Tumurbaatar did? > > Andi > > At 11:41 PM 5/4/2004 +1200, Jevon Wright wrote: > >I tested it on PHP 5 RC1, Win XP SP1, IIS 5.1 running as CGI - it didn't > >fail. > >I tried it on PHP 5 RC2, Win XP SP1, IIS 5.1 running as CGI - it didn't fail > >then, either. > >(Calling c.php) > > > >a.php > > > > > >b.php > > > > > >c.php > > > require_once("a.php"); > > require_once("b.php"); > > ?> > > > >common.php > > > > > >Jevon > > > >----- Original Message ----- > >From: "Tumurbaatar S." > >To: > >Sent: Tuesday, May 04, 2004 5:25 PM > >Subject: [PHP-DEV] nested includes fails? > > > > > > > '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 > > > > > > > > > >-- > >PHP Internals - PHP Runtime Development Mailing List > >To unsubscribe, visit: http://www.php.net/unsub.php > > >