Forum Moderators: coopster

Message Too Old, No Replies

is_writable problem

         

Saint Honore

8:18 am on Nov 2, 2006 (gmt 0)

10+ Year Member



Hello,

Iam facing a strange problem, we have shifted our site to newserver.
Earlier our code was

if (is_writable($file_path_csv))
{
echo "<br>Path=$file_path_csv";
}

This was working fine....
now my code is not working..rather if is use

if (!is_writable($file_path_csv))
{
echo "<br>Path=$file_path_csv";
}

it is working..
what could be the Problem?

please help.

Regards

omoutop

8:23 am on Nov 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Possible php permissions?

According to manual:


Keep in mind that PHP may be accessing the file as the user id that the web server runs as (often 'nobody'). Safe mode limitations are not taken into account.

coopster

3:35 pm on Nov 2, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I would agree, permissions issue is the likely candidate. All you have done in your code there is reversed your conditional logic, which is not what you want. You have simply told PHP to echo the path when it is not writable as opposed to when it is indeed writable.

Check the permissions as suggested, I'm certain you'll find your answer.