Make Script Execution to Unlimited

make script execution to unlimited

You'll have to set it to zero. Zero means the script can run forever. Add the following at the start of your script:

ini_set('max_execution_time', 0);

Refer to the PHP documentation of max_execution_time

Note that:

set_time_limit(0);

will have the same effect.

How can I get infinite maximum execution time with PHP?

When you run it command line there will be no maximum execution time.

You can also use set_time_limit(0); for this if your provider allows manipulation.

I can't tell if your ip-address will get banned - as this depends on the security of the server you send your requests to.


Other solution

You can fetch one (or a few) page(s), and search for new URLs throughout the source code. You can then queue these in a database. Then on the next run, you process the queue.

How to increase maximum execution time in php

ini_set('max_execution_time', '300'); //300 seconds = 5 minutes
ini_set('max_execution_time', '0'); // for infinite time of execution

Place this at the top of your PHP script and let your script loose!

Taken from Increase PHP Script Execution Time Limit Using ini_set()

How to allow infinite maximum execution time for PHP under WAMP?

You can set it to 0. according to :

The maximum execution time, in seconds. If set to zero, no time limit is imposed

Set maximum execution time in PHP

You can use 0 :

max_execution_time = 0     

That will disabled the limitation. Don't forget to restart apache after.

You can also user the PHP version :

<?php set_time_limit(0); ?>

How to increase the execution timeout in php?

You need to change some settings in your php.ini:

upload_max_filesize = 2M 
;or whatever size you want

max_execution_time = 60
; also, higher if you must - sets the maximum time in seconds

Where your PHP.ini is located depends on your system environment. For more information: http://php.net/manual/en/ini.list.php



Related Topics



Leave a reply



Submit