I need to enable pdo_mysql in my EasyPHP environment, so I went to the php.ini file and uncommented the following line:
extension=php_pdo_mysql.dll
Unfortunately I still have the same problem. I'm using the CLI so I suppose I need to locate the php.ini file used by the CLI. How can I find it?
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.
ini is usually located in /etc/php/8.1/apache2/php. ini . Replace 8.1 with your own version, e.g, php5. 6 , php7.
The default location for the php. ini file is: Ubuntu 16.04: /etc/php/7.0/apache2. CentOS 7: /etc/php.
The files are in the host file system (the Linux file system if you are using Linux of course). The Apache config maps to a directory, commonly through the use of a VirtualHost setting.
Just run php --ini
and look for Loaded Configuration File in the output for the location of php.ini
used by your CLI.
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