Set_time_limit trouble
| From: | Mark Villemade | Date: | Tue, 11 Jun 2002 23:36:08 +0000 |
| Subject: | Set_time_limit trouble | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-85149@lists.php.net to get a copy of this message | ||
hi all,
i don't know if i have already asked you about this, but i guess not.
here's my trouble. On one of our application on Lycos Portals, we have a script that makes an
fsockopen on an external server that checks out credit cards and stuff. That server only checks one
card at a time, so if i have 5 clients clicking on 'check' at the 'same' time,
they will be queued and treated in order.
The trouble is, even though i have set_time_limit(0) at the beginning of my script (and i'm not
in safe_mode), if the server takes more than 30 seconds to send an answer back on the socket, the
script dies from hitting max_execution_time.
I have found out that printing anything before the fsockopen() stops that behavior but i can't
use that trick cause i need to use a header() function depending on the result of the server. Of
course i could use output buffering to be able to write an echo and still use header() but
that's a hack and not a solution to what could be a bigger problem here.
This is on php 4.0.6 (not patched like the one i patch for the members' use. This is for
Portals).
Anyone got a rough idea of what could happen and how i could solve this problem ? It's getting
more and more annoying for us since we get more and more clients and the credit card checkin'
server queues more and more ..
Is it a 4.0.6 known bug solved in later versions ?
Thanks for any insight.
Later
Chand