Home  >  Article  >  Backend Development  >  How to modify php.ini invalid problem

How to modify php.ini invalid problem

藏色散人
藏色散人Original
2020-07-08 10:35:562780browse

Invalid method to modify php.ini: First use the root account to log in to the nobody account; then use the "whereis php" command to view the location of "php.ini"; then modify the "php.ini" file ;Finally restart apache.

How to modify php.ini invalid problem

The problem of modifying php.ini not taking effect

Summary: Uploading files larger than 8M requires modifying the php configuration to take effect. But I found a lot of information on modifying the configuration on the Internet, but after modifying it myself, it didn't take effect.

Solution:

Modify the php.ini option. There are many tutorials on the Internet, you can search at will.

1. First use the root account to log in to the nobody account.

2. Then use the whereis php command to check the location of php.ini and modify the php.ini file.

3. Finally, restart apache and it will take effect.

The nobody account here is the account used by apache and has very low permissions.

The main thing to note here is that the configuration file you modify must be the configuration file used by nobody.

Under normal circumstances, if the configuration is modified but it does not take effect, you can consider whether there are multiple configurations on the machine.

For more related knowledge, please visit PHP Chinese website!

The above is the detailed content of How to modify php.ini invalid problem. 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