Reputation: 23
I have this problem when I try to run connect.php
with this code:
$conn = pg_connect("host=localhost dbname=books user=postgres password=123 port=5434");
if($conn){
echo "success";
}
I work with Visual Studio Code and I download the package postgreSQL. After that I restart the XAMPP and nothing happend. I remove semicolon in php.ini
-> extension=php_pdo_pgsql.dll
but the same problem occurs...
Upvotes: 2
Views: 1907
Reputation: 20737
You need to enable pgsql.dll
if you want to use pg_*()
functions.
You enabled php_pdo_pgsql.dll
which allows for connecting to PG DBs using the PDO extension.
Upvotes: 3