#38695 [Opn->Fbk]: is_writable broken

From: Date: Mon, 04 Sep 2006 08:28:30 +0000
Subject: #38695 [Opn->Fbk]: is_writable broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101683@lists.php.net to get a copy of this message
ID: 38695 Updated by: tony2001@php.net Reported By: sk8boardkid at gmail dot com -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Linux PHP Version: 4.4.4 New Comment: var_dump($sp); ? Previous Comments: ------------------------------------------------------------------------ [2006-09-02 23:30:42] sk8boardkid at gmail dot com a safe mode warning is not displayed when safe mode is turned on with uid checking. ------------------------------------------------------------------------ [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

« previous php.bugs (#101683) next »