skip to Main Content

I get an error when I try to connect to the Postgresql server with PHP, and I get an error like this one:

Unable to connect to PostgreSQL server: SCRAM authentication requires libpq version 10 or above in

I use EnterpriseDb, and is pg_connect(); in my code and I don’t know what is wrong.

3

Answers


  1. Chosen as BEST ANSWER

    I got that error when I enabled only one extension extension=php_pgsql.dll in php.ini, I tried again uncomment extension=php_pdo_pgsql.dll , and it's worked well for me


  2. — windows 7 64 / postgresql 13 —
    In my case:
    I did download libpq.dll from https://www.exefiles.com/en/dll/libpq-dll/
    then i did replace old libpq.dll at php directory whit the latest downloaded and
    it did work !

    Login or Signup to reply.
  3. Your application uses APIs linked to the PostgreSQL C library libpq version of 9.6 or earlier

    The SCRAM verification was introduced in Postgres v10. Update libpq on the application side and try again.

    If you don’t need scram-sha-256 analysis, you can switch back to md5 on your Postgres SQL:

    • set password_encryption=md5 in postgresql.conf and change the authentication format to md5 in pg_hba.conf

    • Restart PostgreSQL Service or your computer.

    • Change the user password to an MD5 encrypted password.

      ALTER USER postgres WITH PASSWORD 'old_password'
      
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search