Re: file() problems [newbie]
| From: | Justin French | Date: | Thu, 08 May 2003 00:38:41 +0000 |
| Subject: | Re: file() problems [newbie] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146770@lists.php.net to get a copy of this message | ||
Seems to me it'd be a networking problem, but it seems odd that the server
hangs.
Perhaps next time you get a hang, you could telnet into the BSD box, and
attempt to ping the domain?
<guess>It might also be something to do with file locking or restricting
access on the file's server???</quote>
Justin
on 08/05/03 4:19 AM, MVCS (info@mesilla.com) wrote:
> Trying some simple fopen() and file() on our FreeBSD machine
> (php v4.0.6), and am running into the most irritating problem.
>
> When using file() to get a tiny remote text file (via HTTP), sometimes the
> damn thing works, and later on that day, it doesn't... no error though, just
> a never-ending hang. Sometimes it actually succeeds, after hanging for 2+
> minutes...
>
> I know I should probably just set up a cron job to wget this text file, but
> this way really should work too:
>
> <?php
>
> $weather = file
> ('http://a.small.four/line/textfile.txt');
>
> echo $weather[0];
> echo $weather[1];
> echo $weather[2];
> echo $weather[3];
>
> ?>
>
> etc...
>
> I know it's an oversimplified example, but it _should_ work, and it _does_
> work, but then it wont work for a few hours, then it will...
>
> (the small text file is always present on the remote server, so that's not
> the issue)
>
> Comments? Help? Please? :)
>
>