ID: 45044 Updated by: [EMAIL PROTECTED] Reported By: felipensp at gmail dot com Status: Verified Bug Type: Scripting Engine problem Operating System: FreeBSD 6.3 PHP Version: 5.3CVS-2008-05-20 (CVS) New Comment:
I can verify this on OS X 10.4 with this reproducable script http://trash.chregu.tv/include-bug.php.txt Previous Comments: ------------------------------------------------------------------------ [2008-07-24 19:27:21] [EMAIL PROTECTED] virtual_file_ex() assume that if realpath() does not return NULL the file exists. The problem is that FreeBSD's realpath() will not return NULL if all components *but the last* exist. So php_resolve_path()/tsrm_realpath() will pass /usr/home/felipe/foo.php to virtual_file_ex() and assume it exists. ------------------------------------------------------------------------ [2008-05-30 20:19:00] [EMAIL PROTECTED] status->verified ------------------------------------------------------------------------ [2008-05-20 02:44:43] [EMAIL PROTECTED] [EMAIL PROTECTED]:/home$ cd felipe [EMAIL PROTECTED]:/home/felipe$ mkdir test [EMAIL PROTECTED]:/home/felipe$ cd test [EMAIL PROTECTED]:/home/felipe/test$ echo "<?php include 'foo.php'; ?>" >> test.php [EMAIL PROTECTED]:/home/felipe/test$ echo "foobar" >> foo.php [EMAIL PROTECTED]:/home/felipe/test$ cd .. [EMAIL PROTECTED]:/home/felipe$ ../cellog/workspace/php5/sapi/cli/php test/test.php foobar I am on linux. I suspect zend_resolve_path is broken on FreeBSD and this is part of the segfault you described in phar on IRC. Can we find another FreeBSDer to confirm this? ------------------------------------------------------------------------ [2008-05-20 01:27:00] felipensp at gmail dot com Description: ------------ I've created: ~/test ~/test/test.php: <?php include 'foo.php'; ?> ~/test/foo.php: "foobar" Due this issue all tests (.phpt) that uses include/require fails. PS: This works fine on 5_2. Reproduce code: --------------- [EMAIL PROTECTED] ~]$ php5/sapi/cli/php test/test.php Expected result: ---------------- foobar Actual result: -------------- Warning: include_once(/usr/home/felipe/foo.php): failed to open stream: No such file or directory in /usr/home/felipe/test/test.php on line 6 Warning: include_once(): Failed opening 'foo.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/home/felipe/test/test.php on line 6 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45044&edit=1