i have enabled extension=php_pdo_pgsql.dll and extension=php_pgsql.dll in my php.ini file but still unable to get adminer to work.
and also sudo service apache2 restart
PHP 5.4 or higher is required: 5.4, 5.5, 5.6, 7.0, ... You need to chose between, PostgeSQL PHP extension and PostgreSQL PDO extension. You need to activate the extension you chose.
Connecting to Database php $host = "host = 127.0. 0.1"; $port = "port = 5432"; $dbname = "dbname = testdb"; $credentials = "user = postgres password=pass123"; $db = pg_connect( "$host $port $dbname $credentials" ); if(!
PHP provides many functions for working directly with PostgreSQL databases. To connect to PostgreSQL using native functions, follow these steps: Use the following PHP code to connect to PostgreSQL and select a database.
sudo apt-get install php7.0-pgsql
cd /etc/postgresql/9.5/main
sudo nano pg_hba.conf
local all postgres peer
should be
local all postgres md5
sudo service postgresql restart
then you good to go :)
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