Home > Article > Backend Development > How to set php parameters
How to set php parameters: first find and open the "php.ini" file; then set the value of "max_execution_time" to 30; then modify the value of "max_input_time" to 60; finally save the changes.
The operating environment of this tutorial: Windows 7 system, PHP version 5.6. This method is suitable for all brands of computers.
Recommended: "PHP Video Tutorial"
Settings of several parameters in php.ini
Table 1. Resource-related settings in php.ini
Description | Recommendations Value | |
---|---|---|
How many CPU seconds a script can use | 30 | |
How long (in seconds) a script waits for input data | 60 | |
How long a script can wait before being canceled How much memory (bytes) is used | 32M | |
How much data (bytes) needs to be buffered before the data is sent to the client | 4096 |
max_input_time may have to be increased, either by modifying it in php.ini or by overriding it in code. Similarly, programs that are more CPU or memory intensive may require larger settings. The goal is to mitigate the effects of excessive programs, so disabling these settings globally is not recommended. One more thing to note about
max_execution_time: it represents the CPU time of the process, not the absolute time. So a program that does a lot of I/O and a little computation may run far longer than
max_execution_time. This is why
max_input_time can be greater than
max_execution_time.
The above is the detailed content of How to set php parameters. For more information, please follow other related articles on the PHP Chinese website!