ID:               20452
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Linux Mandrake 9.0
 PHP Version:      4.2.3
 New Comment:

I don't have a 'working' on line example to show you this and I 
don't have posibilities to do it right now, I'm sorry, but I'll try to

show you here what I mean with an example. 
Let's supouse I have one script in this file 
/var/php/scripts/index.php 
and I have a symlink to that file like this 
/var/www/htdocs/index.php -> ../../php/scripts/index.php 
and this file contains the following: 
<?php 
        require("dir/include.php"); 
        require("../dir/include.php"); 
?> 
When I run it, for require("dir/include.php"); it tryes to include 
/var/php/scripts/dir/include.php (the relative path from the 
original location of the file) but for require("../dir/include.php");
it 
tryes to icnlude /var/www/dir/include.php (real path for 
/var/www/htdocs/../dir/include.php) (it is resolving the relative 
path from the symlink and not the original file). 
I'm not sure with behaviour is the right one, but this mix is not 
the right one for sure, I think. 
I hope it helps, if you need more help, just contact me. 
Thank you.


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

[2002-11-16 11:48:31] [EMAIL PROTECTED]

Could you show an example of what you mean?

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

[2002-11-15 17:35:13] [EMAIL PROTECTED]

I'm requesting a page, the file that is called is   
index.php, but this file is a symlink from somewhere else.   
When I require a file from index.php, if there's no '..' 
(dots) on  the path (a relative path, but not going back), 
the relative path is from where  the original file is, but 
if there are  '..' on the path, the relative path is   
from where the symlink is (although php identifies the 
script as the original file in the error message).  
   

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


-- 
Edit this bug report at http://bugs.php.net/?id=20452&edit=1

Reply via email to