php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39970 is_writable() has problems with valid unix paths
Submitted: 2006-12-28 00:50 UTC Modified: 2007-01-05 01:00 UTC
From: karibu at gmx dot net Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 4.4.4 OS: Mac OS X 10.3.9
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: karibu at gmx dot net
New email:
PHP Version: OS:

 

 [2006-12-28 00:50 UTC] karibu at gmx dot net
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-28 10:36 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Cannot reproduce.
 [2007-01-05 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC