From:             karibu at gmx dot net
Operating system: Mac OS X 10.3.9
PHP version:      4.4.4
PHP Bug Type:     Filesystem function related
Bug description:  is_writable() has problems with valid unix paths

Description:
------------
is_writable() has problems to handle certain proper unix 
paths like "/some/dir/../dir/file.suffix"

Reproduce code:
---------------
<?php 

$basedir = dirname(__FILE__);
require_once($basedir.'/../dir/blah.php'); /* this works fine. */

if (!is_writable($basedir.'/../dir/blah.php')) 
{
        echo '1 - blah.php not writeable.';
}
else 
{
    echo '1 - OK';
}

if (!is_writable('../dir/blah.php')) 
{
    echo '2 - blah.php not writeable.';
}
else 
{
    echo '2 - OK';
}

?>

Expected result:
----------------
1 - OK
2 - OK

Actual result:
--------------
1 - blah.php not writeable.
2 - OK

-- 
Edit bug report at http://bugs.php.net/?id=39970&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39970&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39970&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39970&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39970&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39970&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39970&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39970&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39970&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39970&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39970&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39970&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39970&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39970&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39970&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39970&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39970&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39970&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39970&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39970&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39970&r=mysqlcfg

Reply via email to