Hi
I got a php script that went into an infinite loop and the time limit was set to 0 - I got access to shell - is there any way to kill that running script ?
Thanks
Kill running php script
Moderator: General Moderators
Are you a system admin on the server? If so, you'd have to kill the running HTTPD process, e.g.
or substitute 'apache' for 'httpd' in the above statement, OR find the init script and do a 'restart'
Code: Select all
for pid in `ps -axc | grep 'httpd' | awk '{print $1}'`; do kill -HUP $pid; doneWell, unfortunately you'll have to contact your sysadmin (although if they're good they've spotted the issue already and dealt with it).
FYI, you can set 'max_execution_time' in your scripts with ini_set().
FYI, you can set 'max_execution_time' in your scripts with ini_set().