+ Reply to Thread
Results 1 to 3 of 3

Thread: Manually Stopping PHP Script

  1. #1
    recloop is offline x10Hosting Member recloop is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    1

    Manually Stopping PHP Script

    Hello,

    Is there a reliable way to manually kill a PHP script if it has gone astray (ie entered an infinite loop or somesuch)? I know the server will probably kill it after awhile, but I'd like to avoid eating up processing power and memory, and be able to fix the problem and try it again right away.

    Thanks!

  2. #2
    LHVWB's Avatar
    LHVWB is offline Lord Of The Keys LHVWB is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Australia
    Posts
    1,308

    Re: Manually Stopping PHP Script

    If you can detect it within php then you can call the 'die()' function.
    http://au2.php.net/die

  3. #3
    Scoochi2's Avatar
    Scoochi2 is offline x10 Sophmore Scoochi2 is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    Southport!
    Posts
    185

    Re: Manually Stopping PHP Script

    Quote Originally Posted by recloop View Post
    Hello,

    Is there a reliable way to manually kill a PHP script if it has gone astray (ie entered an infinite loop or somesuch)? I know the server will probably kill it after awhile, but I'd like to avoid eating up processing power and memory, and be able to fix the problem and try it again right away.

    Thanks!
    PHP has a timeout. On most servers, execution will stop after 30 seconds whether you want it to or not.
    If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:

+ Reply to Thread

Similar Threads

  1. Cannot get php script to work
    By avidgamer in forum Free Hosting
    Replies: 3
    Last Post: 09-03-2008, 04:35 PM
  2. Replies: 3
    Last Post: 03-10-2008, 12:22 PM
  3. Creating MySql database/table using php script
    By bushimports in forum Free Hosting
    Replies: 1
    Last Post: 02-02-2008, 12:43 AM
  4. How to protect images without htaccess using PHP
    By frznmnky in forum Tutorials
    Replies: 0
    Last Post: 12-26-2007, 11:51 AM
  5. Replies: 8
    Last Post: 12-03-2007, 04:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers