On 27.06.2007 15:49, Raghubansh wrote:
Explanation:
------------
The failure seen here is because of inconsistent behavior of fopen().
fopen() with first argument as boolean true( which will result as 1,
and its an non-existent file) fails with message "No such file or directory"
on Linux(RHEL4/5), WindowsXP, MacOs X, Fedora Core release 3 32bit and SuSE
9 64bit,
but on FC 3 64-bit, it looks like it proceeds further and fails with
Permission denied.
I think the behavior should be made consistent across different platforms. I
would
consider raising a bugzilla if you agree.
I'm afraid it has nothing to do with fopen(), it just returns the error
received from the system.
Explanation:
------------
is_readable() should fail when the given filename is having a trailing slash
because it treats that as a dir.
This behavior is found on most of the OS except SuSE 9 64bit and FC 3 64-bit
where it passes. I beleive the
behavior should be made consistent across OS and hence would like to raise a
bugzilla if you agree.
Again, is_readable() calls system functions, which may fail or pass, PHP can't
fix that.
"Making it consistent" would effectively mean "writing our own version" of those
functions, which is obviously unacceptable.
Other test failures are caused by the very same problem - PHP acts as a glue, it doesn't
implement any system utilities itself, so if some utility is broken/misbehaves, PHP would return wrong result.
That's one of the reasons I like nano-tests (1-10 function calls max), it's easy to detect such situations and
disable the test on a broken platform (or just change the test to work everywhere).
--
Wbr,
Antony Dovgal
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php