I am new to php. I installed php on my CentOS 6.2 machine. I have added an extension but when I install it I get a warning that I should add "extension=mongo.so" to php.ini.I cannot find php.ini. Just above that there is a warning that php_ini is not set to php.ini location. So php doesn't even know where it is. What is php.ini and where should it be located?
The default location for the php. ini file is: Ubuntu 16.04: /etc/php/7.0/apache2. CentOS 7: /etc/php.
ini is usually located in /etc/php/8.1/fpm/php.
The path of php. ini in Ubuntu is /etc/php5/apache2 . Open the terminal and start typing following commands. To view the files present in apache2 directory, type ls command.
Check php. ini in CLI (Command Line Interface): To know about php. ini, simply run on CLI. It look for Loaded Configuration File in output for the location of php.
You can confirm php.ini location by phpinfo();. In my centos, I found as follows.
Configuration File (php.ini) Path => /etc
In most Linux, php.ini seems to be located at "/etc/php.ini"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With