[PHP] Maximumexecutiontimeof30secondsexceeded

Source: Internet
Author: User
[PHP] Maximumexecutiontimeof30secondsexceeded
# Preface when using 'php' to render page pages, if the processing time of the program is too long, it exceeds the configuration file (PHP. ini) when the timeout value is set, the following prompt is displayed:> Maximum execution time of 30 seconds exceeded for example: import a large amount of data into the database; Request resource time is too long ...... # What should I do if an error prompt occurs when the PHP program times out? # Method * directly modify the configuration file (php. ini) [timeout] "# The default maximum execution time is 30 s, which can be modified according to your needs # if it is 0, max_execution_time = 30; "* indirectly modify the configuration information [timeout] add the following code to the php execution File:" phpset_time_limit (0); "* refresh the output buffer [out-of-memory limit] 1. delayed execution in a loop: add the function 'sleep (time) '2. output Buffer: Use the 'OB _ flush () 'and 'flush ()' functions to send data to the browser "php

 '; Ob_flush (); flush ();}"

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.