ID:               38695
 User updated by:  sk8boardkid at gmail dot com
 Reported By:      sk8boardkid at gmail dot com
 Status:           Open
 Bug Type:         Filesystem function related
 Operating System: Linux
 PHP Version:      4.4.4
 New Comment:

a safe mode warning is not displayed when safe mode is turned on with
uid checking.


Previous Comments:
------------------------------------------------------------------------

[2006-09-02 22:57:14] sk8boardkid at gmail dot com

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 this bug report at http://bugs.php.net/?id=38695&edit=1

Reply via email to