Home  >  Article  >  Backend Development  >  How to take effect after changing php.ini

How to take effect after changing php.ini

藏色散人
藏色散人Original
2020-08-27 09:22:452906browse

Processing method after php.ini changes: First modify the upload size limit through the "post_max_size = 100M" statement; then modify the upload time limit through the "memory_limit = 128M" statement; and finally restart the server.

How to take effect after changing php.ini

Recommended: "PHP Video Tutorial"

Upload large files and modify the configuration of php.ini Solution that still doesn't work after that

After I put the program on the service (LAMP environment) today, I found that uploading large files didn't work again. The first solution that came to mind was to modify the PHP in the new installation environment. ini configuration, the modification is roughly divided into two steps:

1. Modify the upload size limit

file_uploads = On

upload_max_filesize = 50M

post_max_size = 100M

2. Modify the upload time limit

max_execution_time = 600

max_input_time = 600

memory_limit = 128M

But I found that after modifying these two After partially restarting Apache, it still didn't take effect, so I was puzzled. After researching for a long time, I found that a netizen reminded me: "Generally, if the configuration is modified but it does not take effect, you can consider whether there are multiple copies of it on the machine. Configuration". Since I installed the integrated environment of wamp, there are two php.ini of wamp, one in the php directory and one in the apache directory. The one under apache works by default, so it still doesn't work after modification. So modify the above modifications again in php.ini under Apache and restart the server! The location is as follows:

How to take effect after changing php.ini

The above is the detailed content of How to take effect after changing php.ini. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn