Thank you for feedback!
Postgres authentication error SCRAM libpq
I switched to MAMP + Postgres as stack for my local developement of Laravel, because my valet configuration was broken after last update (no resolution found for now... sigh). My configuration is:
- Laravel 8.12
- PostgreSQL 15.4
Now when i try to login (endpoint .../api/login) i recieve this error:
Illuminate\Database\QueryException: SQLSTATE[08006] [7] SCRAM authentication requires libpq version 10 or above (SQL: select * from "users" where "email" = admin@ereditaculturali limit 1) in file /Users/vincenzobologna/valet/ereditaculturali/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 712
How can i try to resolve? any suggestions? thanks in advance!
I finally found a solution to my problem, and I want to share to anyone can be fall to this pit:
In /usr/local/etc/php/8.2/php-fpm.d/www.conf after the following:
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
; the current environment.
; Default Value: clean env
;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp
Add an environment variable like this:
env['PGGSSENCMODE'] = disable
Then restart php. This will work even after a reboot.
Please or to participate in this conversation.