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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Wed Dec 25 05:01:27 2024 UTC