Mac OSX Catalina install pdo_pgsql extension for PHP

Viewed 465

I have a laravel application that I've been trying to run, but I get the following error when hitting the database:

Illuminate \ Database \ QueryException (7)
SQLSTATE[08006] [7] FATAL: unsupported frontend protocol 1234.5679: server supports 2.0 to 3.0

I'm running postgres 12.1 (have also tried with 12.2, no go), php 7.2.28 (have also tried with 7.4.3, no go). The stack trace also mentions a PDOException, so I tried using pecl to install pdo_pgsql, to make sure I have the needed drivers, but I keep getting the following error:


Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-bowmanLwaFvm/install-PDO-1.0.3" install
Installing shared extensions:     /private/tmp/pear/temp/pear-build-bowmanLwaFvm/install-PDO-1.0.3/usr/local/Cellar/php@7.2/7.2.28/pecl/20170718/
cp: modules/*: No such file or directory
make: *** [install-modules] Error 1
ERROR: `make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-bowmanLwaFvm/install-PDO-1.0.3" install' failed

I've been fighting this for hours today, just to get this application to connect to the database and work properly. Searching around to try different things, like downloading the pdo_pgsql package and manually building it gives the same error.

Help?

0 Answers
Related