I have a web application that runs on php and that connects to a postgreql database running on a remote Ubuntu server.
To check the php module in apache I created a file that calls the phpinfo() function and when displayed in the browser gives the path to the php.ini file – /etc/php/8.3/apache2/php.ini
enter image description here
as you can see php version 8.3
Postgresql is version 16
I edited this file (php.ini) with nano to enable the PDO drivers for postgresql deleting the semicolons at the beginning of these lines, (thus uncommenting them). I stopped and started the apache 2 service several times (sudo systemctl stop apache2.service, sudo systemctl restart apache2.service)
Despite this, the phpinfo file still shows that the PDO drivers are not enabled (no value). My application, not surprisingly doesn’t run as it fails to make the connection.
I have done this procedure before several times, including my own local Ubuntu computer and never had this problem