4

I'm running a script that should run for at least 30 minutes but the script stops after 30 seconds...

I'm not sure why as it worked on other server before.

Is there somewhere I need to check?

1

2 Answers 2

6

Use this:

set_time_limit(0); 
ignore_user_abort(true);
ini_set('max_execution_time', 0);

You can also edit php.ini:

max_execution_time = 60; //Maximum execution time of each script, in seconds
max_input_time = 60; //Maximum amount of time each script may spend parsing request data

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

1

You might need to tweak the max_execution_time value in the php.ini file. Keep in mind that installations of PHP often keep a php.ini file for the server and one for the command line interpreter. Make sure that you edit the right one.

http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.