Bug #72986 [NEW]: File handling inconsistency between AIX and Linux

From: Date: Wed, 31 Aug 2016 07:55:04 +0000
Subject: Bug #72986 [NEW]: File handling inconsistency between AIX and Linux
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203699@lists.php.net to get a copy of this message
From: matthieu dot sarter dot external at atos dot net Operating system: AIX PHP version: 7.0.10 Package: *Directory/Filesystem functions Bug Type: Bug Bug description:File handling inconsistency between AIX and Linux Description: ------------ AIX and Linux behaves differently when using file functions with regular filenames containing an excedentary trailing slash. Linux raises an error in this case, as expected in the Open Group specifications, while AIX ignores the trailing slash. To ensure consistent behaviour on the two OS, I suggest to add a check for excendentary trailing slash when accessing a regular file on AIX, and to raise the same error as on Linux. This is implemented in the attached patch (tested with PHP 7.0.3, 7.0.7, 7.0.9 and 7.0.10 on AIX 6.1). If consistency is not a priority, some tests under ext/standard/tests/file will need to be skipped on AIX (or better, the trailing slash tests should be grouped in a single phpt file, skipped on AIX, so that the other file related tests won't be skipped) : filegroup_variation3.phpt, fileinode_variation3.phpt, fileowner_variation3.phpt, fileperms_variation3.phpt and ext/standard/tests/file/rename_variation.phpt -- Edit bug report at https://bugs.php.net/bug.php?id=72986&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72986&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72986&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72986&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72986&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72986&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72986&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72986&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72986&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72986&r=support Expected behavior: https://bugs.php.net/fix.php?id=72986&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72986&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72986&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72986&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72986&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72986&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72986&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72986&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72986&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72986&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72986&r=mysqlcfg

« previous php.bugs (#203699) next »