I am using 4.0.7-dev and I too now get this error on unix (FreeBSD
4.3-STABLE).  So it's happening all over.

I think it's a good thing cause it helps remind you that you're trying to
stat something that doesn't exist... and if you're doing that on a file
that might or might not exist then your code should take the proper steps
to silence any warnings (ie. the @).  That way it's clear that you are
ignoring it.

just my 2 cents.

-philip

On Tue, 18 Sep 2001, [ISO-8859-1] "Kasper Skårhøj" wrote:

> Hi folks.
>
> I have a project with over 270 is_dir, is_file and file-exists function calls.
>
> On unix there are no problems.
> On windows (WINNT/PHP Version 4.0.7-dev) these functions may return a warning like:
>
>       Warning: stat failed for log.txt (errno=2 - No such file or directory) in 
>D:\wwwroot\testsite-32b2\tslib\class.tslib_fe.php on line 711
>
> This warning is typically returned if I check whether a file exists but it turns out 
>that not only the file does not exist, the path does not exist!
>
> Now, there are two solutions I can't use:
>
> 1) I will not set error_reporting to exclude warnings, because PHP should to the 
>best of my knowledge not at all bother about these things
> 2) I will not place a @ in front of every function which would potentially return 
>this error.
>
> And furthermore I'm puzzled why this error apparently is only on Windows, not on 
>Unix and certainly has not always been there since I remember earlier when this 
>project did not impose any problems.
>
> So what's up here? Why is this warning justified? And how do I avoid it?
>
> Thanks a lot
>
> (Kasper Skårhøj, Typo3 developer)
>
>
> Best regards and God's blessings
>
> - kasper
> -------------------- o ---------------------
> Were you taught the Earth was flat? Not so! See --->>>  www.answersInGenesis.org
> Check www.typo3.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to