Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39749 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82526 invoked from network); 7 Aug 2008 18:56:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Aug 2008 18:56:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.134.188 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.134.188 mu-out-0910.google.com Received: from [209.85.134.188] ([209.85.134.188:57158] helo=mu-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/24-29324-E354B984 for ; Thu, 07 Aug 2008 14:56:01 -0400 Received: by mu-out-0910.google.com with SMTP id i2so415733mue.3 for ; Thu, 07 Aug 2008 11:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=hyNOf/VSw3FPeb45D7oy6aox1iWRWIbeAgdpOe7kxs4=; b=EYCqYwZmOJg8Guk0bWZ/RbUgryUnkAcIBUw1o9u0SzO883JFTJ5kL/pd4esq7jMa39 wh7B3Qr/m4Kxm41pNIKnorWfTp6zsqZnSvFSwIhAxkrLh49U5lq6hc95l3KL9Yq/CGUz 8Vf7sc1DEMao3dlgHnQHMDojAKubiUBIMLL5Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=poMa7f6ntBYjN55tftpDczUVURTduQHPmqcSAK03XrHIJUO5/FatY9s5TGpfEVBJXo eUzghwTeSLnZkJ8lS434l2t+p3ppwZucmffKBp25NtplCI9Bv1FWwLfvzkrSIi/E80ph 61Elg21LK7qmZruJEOrmXQ+DtJsjYV6Q6+tiU= Received: by 10.103.204.3 with SMTP id g3mr2502099muq.30.1218135355263; Thu, 07 Aug 2008 11:55:55 -0700 (PDT) Received: by 10.103.248.20 with HTTP; Thu, 7 Aug 2008 11:55:55 -0700 (PDT) Message-ID: <7f3ed2c30808071155y21093441o800f5f0eca5ac59e@mail.gmail.com> Date: Thu, 7 Aug 2008 20:55:55 +0200 To: "Rasmus Lerdorf" Cc: "Christian Stocker" , PHPdev , "Dmitry Stogov" In-Reply-To: <489B3CD3.30409@lerdorf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4899C4B4.3060902@liip.ch> <489B3CD3.30409@lerdorf.com> Subject: Re: [PHP-DEV] include bug in 5.3 From: hannes.magnusson@gmail.com ("Hannes Magnusson") On Thu, Aug 7, 2008 at 20:20, Rasmus Lerdorf wrote: > Christian Stocker wrote: >> >> Hi >> >> Since quite some time (weeks), I have this very strange and annoying >> include bug in 5.3-dev and now I think is the time to report it :) >> >> The reproducable script is here: >> >> http://trash.chregu.tv/include-bug.php.txt >> >> In short, when I have >> >> foo/alpha (empty) >> bar/alpha/bar.php >> >> and set the include path to foo/:bar/ >> and then do >> include("alpha/bar.php"); >> it throws an not-found error. >> >> But if I remove foo/alpha, it works correctly. >> >> In the meantime (while I wrote this), I found a similar bug report: >> >> http://bugs.php.net/bug.php?id=45044 >> >> and added my script. >> >> Can please someone look into that, it's not an area where I feel >> comfortable :) > > I have tried to reproduce this on both OSX and FreeBSD and so far I haven't > had any luck. > > This is what I have: > > 11:18am trainburn-lm:~/Web> l foo/alpha/ > total 0 > drwxr-xr-x 2 rasmus users 68 Aug 7 11:10 ./ > drwxr-xr-x 3 rasmus users 102 Aug 7 11:10 ../ > 11:18am trainburn-lm:~/Web> l bar/alpha/ > total 8 > drwxr-xr-x 3 rasmus users 102 Aug 7 11:10 ./ > drwxr-xr-x 3 rasmus users 102 Aug 7 11:10 ../ > -rw-r--r-- 1 rasmus users 12 Aug 7 11:10 bar.php > 11:18am trainburn-lm:~/Web> cat foo.php > ini_set('include_path','foo/:bar/'); > include "alpha/bar.php"; > ?> > > I am getting the contents of bar.php quite nicely both from the command line > and through Apache. This should be really easy to debug with gdb, but it > requires a reproducable case. -bash-2.05b$ php include-bug.php.txt Doesn't work PHP Warning: include(/usr/home/bjori/php5.3-200808071630/one/alpha/bar.php): failed to open stream: No such file or directory in /usr/home/bjori/php5.3-200808071630/include-bug.php.txt on line 40 Warning: include(/usr/home/bjori/php5.3-200808071630/one/alpha/bar.php): failed to open stream: No such file or directory in /usr/home/bjori/php5.3-200808071630/include-bug.php.txt on line 40 PHP Warning: include(): Failed opening 'alpha/bar.php' for inclusion (include_path='./one/:./two/') in /usr/home/bjori/php5.3-200808071630/include-bug.php.txt on line 40 Warning: include(): Failed opening 'alpha/bar.php' for inclusion (include_path='./one/:./two/') in /usr/home/bjori/php5.3-200808071630/include-bug.php.txt on line 40 Now it works: works -bash-2.05b$ find one/ two/ one/ two/ two/alpha two/alpha/bar.php -bash-2.05b$ uname -a FreeBSD pb11.pair.com 4.11-STABLE FreeBSD 4.11-STABLE #1: Tue May 3 13:17:19 EDT 2005 root@pb11.pair.com:/usr/obj/usr/src/sys/NEWPB11 i386 -Hannes