Web lists-archives.com

Re: [PHP] No such file... but there is!





On 28 November 2017 15:58:27 GMT+00:00, Aziz Saleh <azizsaleh@xxxxxxxxx> wrote:
>On Tue, Nov 28, 2017 at 10:53 AM, Jennifer
><jennifer@xxxxxxxxxxxxxxxxxxxx>
>wrote:
>
>> > On Nov 28, 2017, at 7:39 AM, Jasper Kips <jasper@xxxxxxxxxxxxx>
>wrote:
>> >
>> > The problem lies in age path, which is, according to the log
>> …./counter/bots.txt
>>
>>         Sorry.  In those log entries, I replaced the full path with
>those
>> dots.  They are not in the code.
>>
>> > Have you checked the read privileges
>>
>>
>>         Yes. The privileges are correct.
>>
>> > Use the absolute file location instead of the relative one.
>>
>>         I'm using the full, absolute path.  However, since the file
>is in
>> the same folder as the script, maybe I can get away with just the
>file name.
>>
>>         Again, this is an intermittent problem.  It happens rarely,
>so
>> that's why it's a mystery.
>>
>> Thanks.
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>file(.../counter/bots.txt)
>
>tells me that you are using the relative and not absolute path. The
>only
>reason I recommend using the absolute path is that the error would show
>any
>issues, if any that are occurring and from where.
>
>Another choice is to debug the location where the error is happening, I
>have a feeling that it is coming from a location that you are not
>expecting.

If it's intermittent, it could be that the file is locked when you try to open it, a problem with trying to open a shared file when the scripts hitting it could be open at the same time. You could try putting that logic into a database, which is built to handle this sort of concurrent access. 
Thanks,
Ash

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