Home >Backend Development >PHP Problem >How to modify php.ini invalid problem
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.
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!