I want to increase maximum execution time in php , not by changing php.ini
file.
I want to Increase it from my php file.
Is this possible?
I want to increase maximum execution time in php , not by changing php.ini
file.
I want to Increase it from my php file.
Is this possible?
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.
YouTube's target page rendering time is < 100ms (Video here @7:00).
Your bottleneck is probably DB queries - try using
EXPLAIN select * from x...
to see if you can add indexes that will speed up your queries.
edit the link above has died. High Scalability did a feature on YouTube that used that video as its primary source, so it may be of some interest: http://highscalability.com/youtube-architecture
You need to change some setting 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
Were your PHP.ini is located depends on your environment, more information: http://php.net/manual/en/ini.list.php
You can implement your own test runner, for example by extending PHPUnit_TextUI_TestRunner
and make it collect and print run times.
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()