Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39752 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96416 invoked from network); 7 Aug 2008 19:52:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Aug 2008 19:52:48 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:33310] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/A1-22851-F825B984 for ; Thu, 07 Aug 2008 15:52:48 -0400 Received: from trainburn-lm.corp.yahoo.com (trainburn-lm.corp.yahoo.com [207.126.233.11]) (authenticated bits=0) by mail.lerdorf.com (8.14.3/8.14.3/Debian-5) with ESMTP id m77JqcYR019941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 7 Aug 2008 12:52:38 -0700 Message-ID: <489B5285.1070000@lerdorf.com> Date: Thu, 07 Aug 2008 12:52:37 -0700 User-Agent: Thunderbird/3.0a2pre (Macintosh; 2008071516) MIME-Version: 1.0 To: Felipe Pena CC: Hannes Magnusson , Christian Stocker , PHPdev , Dmitry Stogov References: <4899C4B4.3060902@liip.ch> <489B3CD3.30409@lerdorf.com> <7f3ed2c30808071155y21093441o800f5f0eca5ac59e@mail.gmail.com> <1218138548.5346.3.camel@felipe> In-Reply-To: <1218138548.5346.3.camel@felipe> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (mail.lerdorf.com [204.11.219.139]); Thu, 07 Aug 2008 12:52:39 -0700 (PDT) Subject: Re: [PHP-DEV] include bug in 5.3 From: rasmus@lerdorf.com (Rasmus Lerdorf) Felipe Pena wrote: > Em Qui, 2008-08-07 às 20:55 +0200, Hannes Magnusson escreveu: >> 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 >>>> > > When trying debug it days ago, I noticed add that: > +++ TSRM/tsrm_virtual_cwd.c 4 Jul 2008 03:05:16 -0000 > @@ -557,9 +557,11 @@ CWD_API int virtual_file_ex(cwd_state *s > if (use_realpath != CWD_EXPAND) { > #if !defined(TSRM_WIN32)&& !defined(NETWARE) > char resolved_path[MAXPATHLEN]; > + printf(">>> %s\n", path); > if (!realpath(path, resolved_path)) { /* Note: Not > threadsafe on older *BSD's */ > + printf(">> 1\n"); > if (use_realpath == CWD_REALPATH) { > + printf(">> 2\n"); > > ---------------------------------------------------------------- > LINUX: >>>> /home/felipe/php5/sapi/cli/php >>>> /home/felipe/php5/sapi/cli/php >>>> /home/felipe/php5/sapi/cli/php-cli.ini >>> 1 >>>> /usr/local/lib/php-cli.ini >>> 1 >>>> /home/felipe/php5/sapi/cli/php.ini >>> 1 >>>> /usr/local/lib/php.ini >>>> /usr/local/lib/php.ini >>>> /home/felipe/test/test.php >>>> /home/felipe/./foo.php >>> 1 >>> 2 >>>> /usr/local/lib/php/foo.php >>> 1 >>> 2 >>>> /home/felipe/test/foo.php > foo > > ---------------------------------- > BSD: >>>> /usr/home/felipe/php5/sapi/cli/php >>>> /usr/home/felipe/test/test.php >>>> /usr/home/felipe/./foo.php > > Warning: include(/usr/home/felipe/foo.php): failed to open stream: No > such file or directory in /usr/home/felipe/test/test.php on line 1 > > Warning: include(): Failed opening 'foo.php' for inclusion > (include_path='.:/usr/local/lib/php') in /usr/home/felipe/test/test.php > on line 1 That's not the same thing though. Your case seems to show that it isn't using the include_path at all. On BSD after checking ./foo.php why doesn't it continue on to /usr/local/lib/php/foo.php? It certain does for me here. -Rasmus