Re: Script timeout with set_time_limit(0);
| From: | Plutarck | Date: | Thu, 17 May 2001 15:48:19 +0000 |
| Subject: | Re: Script timeout with set_time_limit(0); | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53259@lists.php.net to get a copy of this message | ||
Try setting the timeout to some high setting, beyond how long you need it to
run.
Often PHP just won't run for a really long time, for reasons I don't know.
It just occassionally decides it's done, but I know it can go for longer
than 3 days (phpIRC often lives that long and longer) so that probably isn't
your problem.
Try the function that gets how long your timeout is set to (can't recall the
name atm) before and after you set it and see what it says.
Plutarck
""JFL"" <jfl@signaldigital.dk> wrote in message
news:9e0bga$g7t$1@toye.p.sourceforge.net...
> When I start a script like this :
>
> $fp = fsockopen($host, $port, $errno, $errstr, 30);
> if ($fp) {
> $fputs_str = "GET ".$path." HTTP/1.1\r\n";
> $fputs_str .= "Host: ".$host."\r\n";
> $fputs_str .= "\r\n";
> fputs($fp, $fputs_str);
> fclose($fp);
> }
>
> The script will run for some time. But then ends. I have set
> set_time_limit(0);
> ignore_user_abort(1);
> but the script does not run through.
>
> What can I do ?
> --
> [ www.eksperten.dk ] Scandinavias biggest IT forum.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>