0

I'm in Laravel 5.8 don't know why I kept getting this error while loggin in

SQLSTATE[08006] [7] authentication method 10 not supported (SQL: select * from "users" where "uuid" = ****** limit 1)

I've tried various version of PostgresSQL from this link.


14

I started off with psql version 14. Try logging in... error started to happen.


13

I uninstalled 14 and installed 13. Try again... error still persists.


9.6

I've tried uninstalling 13 and installed 9.6, and Try again... error still persists.

enter image description here


Each time, I downgrade my postgres version, I had to recreate the database and restore from a backup .sql file.

psql -U postgres -d dbname < dbname.sql

Is this something wrong with my Laravel/PHP/Postgres config that leads to this ? I'm running out of ideas now ...


pg_hba.conf

I couldn't find the file.

beta@Betas-MacBook-Pro boss-portal % psql -U postgres
Password for user postgres: 
psql (9.6.24)
Type "help" for help.

postgres=# 
postgres=# 
postgres=# SHOW hba_file;
                 hba_file                 
------------------------------------------
 /Library/PostgreSQL/9.6/data/pg_hba.conf

I went to check

/Library/PostgreSQL/9.6/data/pg_hba.conf

It's not there.

code-8
  • 54,650
  • 106
  • 352
  • 604
  • Update client library (i.e. PHP version?) or downgrade the server to something before version 10 (which doesn't sound like a great option) – miken32 Dec 01 '21 at 23:31
  • I am in php 7.3 – code-8 Dec 01 '21 at 23:33
  • On my other mac OS Big Sur, also in php 7.3 with postgres 13.1 logged in fine. – code-8 Dec 01 '21 at 23:35
  • I don't the link in the post answering my question. – code-8 Dec 01 '21 at 23:35
  • To proof his point, I can uninstall my postgres 13, and try out the postgres 10. – code-8 Dec 01 '21 at 23:35
  • It would have to be a version before 10. Not sure if you can change the authentication method in the server configuration. – miken32 Dec 01 '21 at 23:36
  • change the authentication method to what ? in what file ? – code-8 Dec 01 '21 at 23:37
  • Something that isn't method 10 I would assume. I'm not familiar with Postgres. – miken32 Dec 01 '21 at 23:40
  • I’m trying with older version of Postgres now – code-8 Dec 01 '21 at 23:48
  • @miken32 Sadly even the earlier version than, I still face that issue. I think the version of Postgres is not the root cause of all of these. I've tried 14,13,9.6. – code-8 Dec 01 '21 at 23:59
  • See also: https://stackoverflow.com/questions/64474420/postgresql-authentication-method-10-not-supported Looks like you're using scram authentication on the server, with a client which does not support that. You can upgrade the client, or turn off scram authentication on the server. Merely downgrading the server won't help, because you'll still be using scram authentication. – Nick ODell Dec 02 '21 at 00:16
  • When you said client, are you referring to my Laravel 5.8 application ? Is there any file that I can check that I am using a scram authentication ? – code-8 Dec 02 '21 at 00:18
  • This: `psql -U postgres -d dbname < dbname.sql` proves you can connect. You will need to provide your `pg_hba.conf` contents as well as what `password_encryption` is set to in `postgresql.conf`. Add as text updates to your question. Using images for textual information is not useful. – Adrian Klaver Dec 02 '21 at 00:19
  • @NickODell I saw the link you shared, I was on that link like 5 times already today even before posting this post. It's not related to Laravel. My post will be beneficial to those that use Laravel, and Postgres like myself. – code-8 Dec 02 '21 at 00:19
  • @AdrianKlaver .... See I knew it.... I knew it has sth to do with the config, not version of the Postgres. Let me check that file and share with you, and maybe update the post with that details so all of us can see itl. \ – code-8 Dec 02 '21 at 00:20
  • 2
    Also see [Scram auth](https://stackoverflow.com/questions/62807717/how-can-i-solve-postgresql-scram-authentifcation-problem). I'm guessing the underlying `PHP(PDO?)` driver is not update. – Adrian Klaver Dec 02 '21 at 00:25
  • Laravel use PHP (PDO) correct, I couldn't find the file you asked (pg_hba.conf). – code-8 Dec 02 '21 at 00:28
  • This is nothing to do with Laravel, it’s the PHP client libraries. That’s why I suggested updating to a current version of PHP in my first comment. – miken32 Dec 02 '21 at 00:37
  • I am in PHP 7.3 already, it shipped with the Mac OS X, what version, do you want me to go to ? I am in L5.8, more than PHP 7, it can't run L5.8. – code-8 Dec 02 '21 at 00:39
  • Upgrade the `libpq` that PHP is linked with, and it will work. – Laurenz Albe Dec 02 '21 at 05:33
  • @LaurenzAlbe Do you know a link with instruction on how do that ? – code-8 Dec 02 '21 at 15:30
  • No link. The procedure will depend on how you installed `libpq` in the first place. – Laurenz Albe Dec 02 '21 at 15:44

0 Answers0