From: Operating system: Linux 2.6.35 PHP version: 5.3SVN-2011-01-05 (SVN) Package: Filesystem function related Bug Type: Bug Bug description:is_writable returns always false
Description: ------------ When php script is run via apache is_writable always returns false : 'is_writable()' always returns 'false' whatever : - the permission write sets or not. - safe_mode on or off - the owner of the file being root:root or apache:apache on the other side, 'is_readable()' returns the correct value (either 'true' when the file is made readable or 'false' when the file is made unreadable). But, when the same script is run by the php command line (under root) - is_writable returns the correct value. Test script: --------------- <?php if (is_writable("toto")) { echo "is_writable<br>"; } else { echo "is not writable!!!<br>"; } ?> Expected result: ---------------- is_writable in case 'toto' is writable is not writable in case 'toto' is not writable -- Edit bug report at http://bugs.php.net/bug.php?id=53658&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53658&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53658&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53658&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53658&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53658&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53658&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53658&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53658&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53658&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53658&r=support Expected behavior: http://bugs.php.net/fix.php?id=53658&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53658&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53658&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53658&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53658&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53658&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53658&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53658&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53658&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53658&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53658&r=mysqlcfg