Web lists-archives.com

Re: Hard link shows php source code

On January 30, 2019 5:27:29 AM UTC, Jeffry Killen <jekillen@xxxxxxxxxxx> wrote:
>> On Jan 29, 2019, at 8:46 PM, Sam Hobbs <Sam@xxxxxxxxxxxxxxxxxx>
>> Jeffry Killen wrote on 1/29/2019 8:35 PM:
>>> The ''situation" is when a hard link name without a .php suffix is
>>> a php script file that is recognized by .php suffix.
>> Recognized how? What is to be done with it? When you say "is
>recognized by .php suffix" do you mean that the file having a php
>suffix is to be processed as a PHP file? Do you want that to happen for
>all files having a php suffix?
>> The original question said "the php source code was displayed". Is
>that what you want to happen or not happen? The relevance of the php
>source code being displayed is not clear.
>Will a link to a php source code file that is named without a php
>suffix be considered and run as a php source code file?
>I hope this clears it up. I don't know how I can clarified further.

A hard link is basically just another filename pointing to the same contents of the file. If you don't give that a file extension, why would you expect Apache to know what type of preprocessor to use on it?

It's like if you renamed all your image file extensions, but still expected them to open correctly in Photoshop.

A soft link would behave a little differently, and would make a reference to the original file pointer, so there is some way for it to understand what file extension it might have.