From: sk8boardkid at gmail dot com
Operating system: Linux
PHP version: 4.4.4
PHP Bug Type: Filesystem function related
Bug description: is_writable broken
Description:
------------
The function "is_writable" does not work correctly:
The attached script does not give the correct result when run from the
command line or from apache
the session.save_path is set to "/tmp" in php.ini which has the following
permissions:
drwxrwxrwt 25 root root 4096 Sep 2 23:30 tmp
this is the normal file permissions for the linux /tmp directory.
with these permissions any use can write into this directory, but the
"is_writable" function returns "false"
Reproduce code:
---------------
<?php
//checks if temp is writeable
$sp=ini_get('session.save_path');
echo $sp . "<br/>";
if (is_writable($sp)) {
echo 'The file is writable';
} else {
echo 'The file is not writable';
}
?>
Expected result:
----------------
/tmp<br/>The file is writable
Actual result:
--------------
/tmp<br/>The file is not writable
--
Edit bug report at http://bugs.php.net/?id=38695&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=38695&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=38695&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=38695&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38695&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=38695&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38695&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38695&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38695&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38695&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38695&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=38695&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=38695&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38695&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38695&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38695&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38695&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38695&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38695&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38695&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38695&r=mysqlcfg