On Thu, Aug 7, 2008 at 20:20, Rasmus Lerdorf <[EMAIL PROTECTED]> 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 > <?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 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/NEWPB11 i386 -Hannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php