#45044 [Ctl->Fbk]: relative paths not resolved correctly

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               45044
 Updated by:       [email protected]
 Reported By:      felipensp at gmail dot com
-Status:           Critical
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: FreeBSD 6.3
 PHP Version:      5.3CVS-2008-05-20 (CVS)
-Assigned To:      dmitry
+Assigned To:      fb-req-jani
 New Comment:

Isn't this fixed now by Dmitry's commit..?


Previous Comments:
------------------------------------------------------------------------

[2008-08-06 15:33:54] [email protected]

Dmitry, could you take a look at this, plz?

------------------------------------------------------------------------

[2008-08-06 15:33:28] [email protected]

I can verify this on OS X 10.4 with this reproducable script

http://trash.chregu.tv/include-bug.php.txt




------------------------------------------------------------------------

[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]

cellog@lot-49:/home$ cd felipe
cellog@lot-49:/home/felipe$ mkdir test
cellog@lot-49:/home/felipe$ cd test
cellog@lot-49:/home/felipe/test$ echo "<?php include 'foo.php'; ?>" >>
test.php
cellog@lot-49:/home/felipe/test$ echo "foobar" >> foo.php
cellog@lot-49:/home/felipe/test$ cd ..
cellog@lot-49:/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?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/45044

-- 
Edit this bug report at http://bugs.php.net/?id=45044&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.