Does anyone know how to beat the Execution Time of PHP without editing the php.ini file? I'm developing a program that takes a long time to finish. Most users will only allow a minute or less of PHP execution time. How do I get around this?
Execution Time
Started by smith, Jan 05 2007 02:33 PM
2 replies to this topic
#1
Posted 05 January 2007 - 02:33 PM
for (int i;;) {
cout << "Smith";
}
|
|
|
#2
Posted 05 January 2007 - 10:27 PM
I couldn't imagine a script taking more than one minute to load, what are you doing?
Anyway give this a try set_time_limit() or maybe max_execution_time
They should help :)
Anyway give this a try set_time_limit() or maybe max_execution_time
They should help :)
#3
Guest_Jordan_*
Posted 06 January 2007 - 01:46 PM
Guest_Jordan_*
The max_execution_time is set in the ini file but set_time_limit() seems to work for most of my projects. I had a project that took about 4 hours to complete once and it was all done in PHP. It pulled about 500,000 rows of data from two different databases across a WAN. The WAN was slow at that.
Anyway, to resolve the time issue I had to rewrite the PHP and use PHP to do most of the functions instead of the database (as I had when it took 4 hours to execute). This was a bit more code and kind of confusing but in the end it only took 20 seconds to complete.
Nice suggestion Sidewinder!
Anyway, to resolve the time issue I had to rewrite the PHP and use PHP to do most of the functions instead of the database (as I had when it took 4 hours to execute). This was a bit more code and kind of confusing but in the end it only took 20 seconds to complete.
Nice suggestion Sidewinder!


Sign In
Create Account


Back to top









