: This article mainly introduces the solution to the phpFatalerror: Maximumexecutiontimeof30secondsexceededin problem. if you are interested in the PHP Tutorial, refer to it. Php Fatal error: Maximum execution time of 30 seconds exceeded in solution:
Reposted from: www.alixixi.com/program/a/2011110575885.shtml
This error indicates your php
The execution time exceeds the maximum execution time set in the configuration file by 30 seconds. this is not a problem in your program.
It is a problem with the system configuration file. if your network speed is fast, this error may not occur again,
You can make some modifications to this problem. There are three methods:
1. modify the php configuration file and find the php. ini file. it should generally be placed in your C: \ WINDOWS directory, and then find
Max_execution_time = 30; // Set it to the value you want, in seconds.
This line sets the maximum execution time to 30 seconds. you can modify this value to your expected value. (You can also set it to: max_execution_time = 0)
2. Using the ini_set () function, not everyone can modify the php. ini file, you can use this function to change your maximum execution time limit value, such:
Ini_set ('max _ execution_time ', '123 ');
The value is set to 100 seconds. you can also set the value to 0, which means that the execution time is not limited.
3. using the set_time_limit () function, set_time_limit (20) indicates the maximum execution time plus 20 seconds. However, if you run the safe mode in php, set_time_limit () will not produce any results, unless you use the first method.
Set_time_limit --- maximum execution time set_time_limit (PH3, PHP4) set_time_limit --- maximum execution time syntax: void set_time_limit (int seconds) description: set the number of seconds that a program can run. if the time limit is reached, the program will return an error.
The default limit time is 30 seconds. The value of max_execution_time is defined in the structure File (php3.ini in PHP3 and php in PHP4. ini). If the number of seconds is set to 0, there is no time limit.
When you call this function, set_time_limit () calculates the maximum execution time from scratch. that is, if the maximum execution time is 30 seconds, however, if it takes 25 seconds to execute the program before calling set_time_limit (20), the maximum program execution time will be 45 seconds.
Note: When PHP is executed in safe mode, set_time_limit () will not produce any results, unless it is disabled in safe mode or modified in the structure file (in PHP3, it is called php3.ini, PHP4 is called php. ini.
The above describes the solution to the php Fatal error: Maximum execution time of 30 seconds exceeded in problem, including some content. I hope my friends who are interested in the PHP Tutorial can help me.