|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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?
__________________
Code:
for (int i;;) {
cout << "Smith";
}
|
| Sponsored Links |
|
|
|
|||||
|
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 ![]() |
|
|||||
|
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!
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP: Execution Time Function | Jordan | PHP Tutorials | 8 | 09-22-2008 01:54 AM |
| A time showing tutorial | ahsan16 | VB Tutorials | 1 | 01-10-2007 04:50 AM |
| Time format | xXHalfSliceXx | HTML Programming | 0 | 12-10-2006 07:15 PM |
| Odd Timestamp | dirkfirst | C# Programming | 10 | 12-08-2006 04:40 PM |
| Maximum Execution Time | Lop | PHP Forum | 4 | 07-15-2006 08:25 PM |
| Xav | ........ | 1333.07 |
| MeTh0Dz|Reb0rn | ........ | 1059.52 |
| John | ........ | 887.37 |
| morefood2001 | ........ | 879.43 |
| marwex89 | ........ | 869.98 |
| WingedPanther | ........ | 851.68 |
| Brandon W | ........ | 764.23 |
| chili5 | ........ | 312.39 |
| Steve.L | ........ | 254.16 |
| dcs | ........ | 225.25 |
Goal: 100,000 Posts
Complete: 82%