Re: [PHP-DB] Soft-Linking and includes

2002-03-08 Thread Indioblanco

My limited understanding of Unix hard and soft links is that 
/www/dir2/subdir is not a directory, it is a pointer to the inode that 
is pointed to by /www/dir1/subdir. I think to accomplish what you want, 
/www/dir2/subdir would have to be a true directory, filled with soft 
links to each of the files in /www/dir1/subdir, or your include would 
need an explicit path.

Jonathan Hilgeman wrote:

I'm on a red hat system, and I've soft-linked two directories:
/www/dir1/subdir
/www/dir2/subdir -- /www/dir1/subdir

Now, inside subdir is a file that tries to include(../info.php); which
prints out some information about the file paths and my database stuff. So
there's:
/www/dir1/info.php
/www/dir1/subdir/includer.php
/www/dir2/info.php
/www/dir2/subdir -- /www/dir1/subdir

Now, when I run /www/dir2/subdir/includer.php, it SHOULD include the file
../info.php which translates into /www/dir2/info.php. However, the
symbolic linking seems to have messed it up, and instead of running dir2's
info.php, it seems to think it is in dir1, and instead includes dir1's
info.php file. 

Has anyone run into this and/or know a fix for it?

Thanks!

- Jonathan


-- 
Out beyond the ideas of wrong-doing and right-doing
there is a field. I'll meet you there.
-Rumi
*(O)*
[EMAIL PROTECTED] 
*** under construction ***
http://centralcoasthealing.net   Healing Resources on the Central Coast
http://kornsnake.com   Internet Development








-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Soft-Linking and includes

2002-03-08 Thread olinux

You must use absolute paths in includes. essentially
the include will reference itself as the starting
point, rather than the script you are calling it from.

olinux


--- Jonathan Hilgeman [EMAIL PROTECTED] wrote:
 I'm on a red hat system, and I've soft-linked two
 directories:
 /www/dir1/subdir
 /www/dir2/subdir -- /www/dir1/subdir
 
 Now, inside subdir is a file that tries to
 include(../info.php); which
 prints out some information about the file paths and
 my database stuff. So
 there's:
 /www/dir1/info.php
 /www/dir1/subdir/includer.php
 /www/dir2/info.php
 /www/dir2/subdir -- /www/dir1/subdir
 
 Now, when I run /www/dir2/subdir/includer.php, it
 SHOULD include the file
 ../info.php which translates into
 /www/dir2/info.php. However, the
 symbolic linking seems to have messed it up, and
 instead of running dir2's
 info.php, it seems to think it is in dir1, and
 instead includes dir1's
 info.php file. 
 
 Has anyone run into this and/or know a fix for it?
 
 Thanks!
 
 - Jonathan
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Soft-Linking and includes

2002-03-08 Thread Jonathan Hilgeman

However, on a different, FreeBSD platform, this is not the case. A linked
file can call an include and have the desired file be called instead of the
source one. That's where I'm getting confused.

- Jonathan

-Original Message-
From: olinux [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 12:28 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Soft-Linking and includes


You must use absolute paths in includes. essentially
the include will reference itself as the starting
point, rather than the script you are calling it from.

olinux


--- Jonathan Hilgeman [EMAIL PROTECTED] wrote:
 I'm on a red hat system, and I've soft-linked two
 directories:
 /www/dir1/subdir
 /www/dir2/subdir -- /www/dir1/subdir
 
 Now, inside subdir is a file that tries to
 include(../info.php); which
 prints out some information about the file paths and
 my database stuff. So
 there's:
 /www/dir1/info.php
 /www/dir1/subdir/includer.php
 /www/dir2/info.php
 /www/dir2/subdir -- /www/dir1/subdir
 
 Now, when I run /www/dir2/subdir/includer.php, it
 SHOULD include the file
 ../info.php which translates into
 /www/dir2/info.php. However, the
 symbolic linking seems to have messed it up, and
 instead of running dir2's
 info.php, it seems to think it is in dir1, and
 instead includes dir1's
 info.php file. 
 
 Has anyone run into this and/or know a fix for it?
 
 Thanks!
 
 - Jonathan
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Soft-Linking and includes

2002-03-07 Thread Jonathan Hilgeman

I'm on a red hat system, and I've soft-linked two directories:
/www/dir1/subdir
/www/dir2/subdir -- /www/dir1/subdir

Now, inside subdir is a file that tries to include(../info.php); which
prints out some information about the file paths and my database stuff. So
there's:
/www/dir1/info.php
/www/dir1/subdir/includer.php
/www/dir2/info.php
/www/dir2/subdir -- /www/dir1/subdir

Now, when I run /www/dir2/subdir/includer.php, it SHOULD include the file
../info.php which translates into /www/dir2/info.php. However, the
symbolic linking seems to have messed it up, and instead of running dir2's
info.php, it seems to think it is in dir1, and instead includes dir1's
info.php file. 

Has anyone run into this and/or know a fix for it?

Thanks!

- Jonathan

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php