Sorry, it should be $file for both as in the more complex code. So the below code is the code that is generating "the file is not writable".

if (file_exists($file)) {
        if(!is_writeable($file)){
            echo "the file is not writable";
        }
 } else echo "The file does not exist";

This bug http://bugs.php.net/bug.php?id=30931 is similar, and would have been resolved already in v5.1

Best regards,
Peter Lauri


Quoting Edward Kay <[EMAIL PROTECTED]>:

Maybe it's because you're testing two different variables, $file and
$menu_filename?

Edward

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 05 January 2007 11:02
To: php-general@lists.php.net
Subject: [PHP] is_writable() not working on PHP 5.1.6


Hi,

I am running Fedora Core 6 with PHP 5.1.6

This little snippet will output "the file is not writable":



if (file_exists($file)) {
        if(!is_writeable($menu_filename)){
            echo "the file is not writable";
        }
} else echo "The file does not exist";



I have set the permissions to 777 for the file and also put group and
user to apaches user. So that is not an issue.

I have seen some bug reports on this, but haven't figured out how
to solve it.

Is this a PHP 5.1.6 related bug? I haven't seen any fix or similar.

Best regards,
Peter Lauri

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to