Re: Question regarding include() and symlinks to directories
| From: | Jochem Maas | Date: | Mon, 08 Jan 2007 10:17:31 +0000 |
| Subject: | Re: Question regarding include() and symlinks to directories | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246746@lists.php.net to get a copy of this message | ||
Vincent DUPONT wrote:
> hello,
> if I can still contribute to this topic, I suggest you never use simlinks.
> We experienced very bad maintenance problems at a customer : when copying new files through
> FTP, the simlinks were often erased or overwriten.
> And this occured on every upgrade of the scripts.
>
> This would not occur with a simple and stable include_path setting. Moreover, one can set the
> include_path dircetly from PHP, allowing for example 2 applications to define their own
> include_path.
>
> Finaly, simlinks are not available on win32 platforms.
not completely true - windows does have something they like to call hardlinks - which pretty
much do the same thing:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil_hardlink.mspx?mfr=true
that said I also would recommend using a well thought out include_path strategy over a solution that
uses symlinks, given the choice. of course Karl is living a deployed, production system
and he probably does not have the luxury of *just* switching over.
>
> So, the include_path should be more stable (considering FTP) and more flexible than simlinks.
>
>
>
> Vincent Dupont
> Ausy Belgium
>
>
>
> -----Original Message-----
> From: Richard Lynch [mailto:ceo@l-i-e.com]
> Sent: Sat 1/6/2007 0:17
> To: Karl Pflästerer
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Question regarding include() and symlinks to directories
>
> On Thu, January 4, 2007 2:47 pm, Karl Pflästerer wrote:
>> In my opinion include() should respect symlinks to directories and not
>> dereference them before finding the file to include. Or am I wrong
>> here?
>> The PHP version is 5.1.6 (will soon be updated).
>
> WHOOPS!
>
> My fingers slipped and I keyboarded to "Send" button.
>
> SORRY!
>
> ... and use full pathname when you go to read a file.
>
> Anything else is more like playing an Adventure Game than Programming.
>
> I can see arguments both ways for when to work out the symlink, so
> you'd have to take this up with Internals to get a change made...
>