Re: Linux / Unix difference
| From: | Patrick ALLAERT | Date: | Thu, 23 Jul 2009 15:20:54 +0000 |
| Subject: | Re: Linux / Unix difference | ||
| References: | 1 2 3 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-65244@lists.php.net to get a copy of this message | ||
2009/7/23 zoe <zoe.slattery@googlemail.com>:
> Derick Rethans wrote:
>>
>> On Thu, 23 Jul 2009, Patrick ALLAERT wrote:
>>>
>>> I just wanted to drop a note about an annoying difference between
>>> Linux and Unix (at least some Solaris and HP-UX) regarding pathname
>>> resolution:
>>>
>>
>> <snip>
>>>
>>> As you see, Unix system calls let you access a file using a *trailing
>>> slash*. Linux (and apparently BSD's) not.
>>>
>>> Taking this into account, phpt tests files shouldn't test those edge
>>> case like it is currently the case with:
>>> ext/standard/tests/file/filegroup_variation3.phpt
>>> ext/standard/tests/file/fileinode_variation3.phpt
>>> ext/standard/tests/file/fileowner_variation3.phpt
>>> ext/standard/tests/file/fileperms_variation3.phpt
>>> ... and possibly others.
>>>
>>> I will fix them,
>>>
>>
>> They should test this, and verify that the behavior (from a PHP user point
>> of view) is exactly the same.
>>
>
> Agreed. The test cases should not be changed, should this be raised as a
> bug? I'm not sure where it would be best fixed, I assume PHP is just passing
> platform dependent behaviour back to the user?
>
> Zoe
This is the kind of thing which is of course highly debatable.
In my point of view, PHP shouldn't unify system calls (lstat*)
behaviours. Because as a *user*, I expect that a PHP fopen() and co.
would react the same way as my OS does while opening a file.
The same is true with the fact that filenames are case sensitive under
Linux and not under Windows and it is not the role of PHP to unify
that.
Patrick