Php program execution timeout solution (Fatalerror: Maximumexecutiontimeof30)

Source: Internet
Author: User
When running a collection page, the page was found to have encountered a Fatalerror: Maximumexecutiontimeof30secondsexceededin error over 30 seconds. this Baidu said it was a configuration... A Fatal error: Maximum execution time of 30 seconds exceeded in error occurred when running a collection page. this Baidu said it was a configuration problem, the solution is as follows.

This error does not mean that the php execution time has exceeded the maximum execution time set in the configuration file for 30 seconds, not your program error, but the system configuration file problem, if your server is configured with high speed, this error will not occur again.

If this problem occurs, you can modify it as follows:

1. modify the php configuration file and find php. ini file, which 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.

2. use the ini_set () function. Not everyone can modify the php. ini file. you can use this function to change the maximum execution time limit value. The code is as follows:

Ini_set ("max_execution_time", "100"); // Set it to the value you want, in seconds .phprm.com

3: Add a program directly on the page

Available program modification: set_time_limit (0 );


Address:

Reprinted at will, but please attach the article address :-)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.