| Author |
Message |
Cricket
Joined: 25 Nov 2005 Posts: 6
|
Posted: Tue Jul 18, 2006 7:38 am Post subject: Infite loops and other unintended coding events |
|
|
Very new to PHP.
If (when?) I create an infinite loop, memory leak, or any of the other things which are likely to confuse the system:
- what's going to happen
- is there anything I can/should do besides wait for a reset?
(The tutorial says I should click on the Apache icon in on the right of my task bar to restart the server. Somehow I don't think you'd like me to do that. Still, it's better than the tutorials that don't even mention the possibility.)
Assuming the answer is wait for the server to notice the problem and reset things, how long will that take? Is there a way for me to reconfigure it safely (so I'm not waiting for hours)? (I've checked phpinfo and don't understand half the settings, so it might be hiding in plain sight.)
Thanks in advance,
Sandy
cricket@onebit.ca |
|
| Back to top |
|
 |
shivin Guest
|
Posted: Mon Oct 02, 2006 12:29 am Post subject: |
|
|
| If the process is on an infinite loop, you have to kill the process ID via SSH. |
|
| Back to top |
|
 |
Cricket
Joined: 25 Nov 2005 Posts: 6
|
Posted: Wed Oct 04, 2006 9:16 am Post subject: |
|
|
Seeing as I've no clue how to kill a process, I guess this isn't a good idea.
Wouldn't the php timeout do something?
Cricket |
|
| Back to top |
|
 |
shivin Guest
|
Posted: Mon Oct 09, 2006 12:20 am Post subject: |
|
|
Yes. That is an alternative though. By default, php scripts will timeout after 30 seconds.
If you have ssh access you can kill the pricess without waiting for the time-out to happen.
just enter this command
kill -9 pid
where pid specifies the process ID |
|
| Back to top |
|
 |
|