Page 1 of 1

timeout problem in PHP

Posted: Mon Aug 30, 2004 8:10 pm
by rei
i'm coding a php program which will call a shell script through a button.

program : myprogram.php
shell program to be called myshell.sh

When the button is clicked, myshell.sh is executed, and result is displayed in a textarea in the original php program (myprogram.php)
<FORM METHOD=post ACTION=$_PHP[SELF]>

Now, i'm facing problem that, myshell.sh works for around 3 hours(doing large calculations), and i'm afraid of time out problem with php or apache.

I read on the website that i can set the php.ini to
set_time_limit(0)

Does this means that my php will hang there until the process is being finished?

How about apache time out?

What should i basically do to enable calculation working for 3 hours without any timeout problem occuring?

Posted: Mon Aug 30, 2004 8:19 pm
by feyd
set_time_limit is the correct thing to change. I have yet for the server to hang. That depends mostly on the script not taking over 100% of the CPU for that time though. If this needs to be done on a somewhat regular basis, I'd suggest setting up a cron for it.