Giter Site home page Giter Site logo

upgrade pdo_pgsql to support SNI about php HOT 14 OPEN

guoxiangke avatar guoxiangke commented on June 8, 2024 1
upgrade pdo_pgsql to support SNI

from php.

Comments (14)

braumye avatar braumye commented on June 8, 2024 3

If you're using Laravel, you can use this package https://github.com/braumye/laravel-vercel-postgres that add the endpoint to the options of the dsn and it worked for me.

Neon document: https://neon.tech/docs/connect/connection-errors#b-use-libpq-keyvalue-syntax-in-the-database-field

from php.

f3l1x avatar f3l1x commented on June 8, 2024 2

Hi, I will prepare PHP update with postgres14. I hope it will solve your troubles.

from php.

zone-connect avatar zone-connect commented on June 8, 2024 2

Hello, The official work-around that seems to work is to append the endpoint_ID with the password in the connection string like

DATABASE_URL=postgres://dbuser:<endpoint=<endpoint_id>>;<your_password>@ep-broad-snowflake-sdexc.il-central-1.aws.neon.tech/neondb?pgbouncer=true&connect_timeout=10

So basically, add this --> endpoint=<endpoint_id>; (including the comma)

Alternatively, if you are using database connection parameters, you can use the following

...
DB_PASSWORD='<endpoint=<endpoint_id>>;<your_password>' 

In our case, the endpoint ID is --> ep-broad-snowflake-sdexc (as seen in the connection URL above)

Hope this helps.

from php.

guoxiangke avatar guoxiangke commented on June 8, 2024

thanks.

from php.

aungmyatmoethegreat avatar aungmyatmoethegreat commented on June 8, 2024

I am also facing that issue too, we have to update that in vercel php.

from php.

asispts avatar asispts commented on June 8, 2024

Related: vercel/storage#120

from php.

f3l1x avatar f3l1x commented on June 8, 2024

Hi. Do you know which exactly libraries needs to be upgraded?

from php.

aungmyatmoethegreat avatar aungmyatmoethegreat commented on June 8, 2024

pgsql Liv I think so

from php.

coolymoon avatar coolymoon commented on June 8, 2024

Same here. Is there any way to upgrade the libpq?

The [email protected] - PHP 8.2.x (https://example-php-8-2.vercel.app/) shows the version of libpq is 10.21, which is unsupported now.

The latest version is 16 and according to neon.tech (Vercel's Postgres provider), SNI support was added to the libpq in version 14, which was released in September 2021.

from php.

dbazhenov avatar dbazhenov commented on June 8, 2024

I ran into a similar problem today. I make connection via pg_connect and to solve the problem I added
options='endpoint=ep-shrill-disk-*****'

The connection worked successfully
$connect_data = "host=ep-shrill-disk-.eu-central-1.aws.neon.tech port=5432 dbname=php-neon user=daniil.bazhenov password= sslmode=require options='endpoint=ep-shrill-disk-*****'";

$db_connect = pg_connect($connect_data);

from php.

deepakplay avatar deepakplay commented on June 8, 2024

@dbazhenov
I was having the same issue in laravel vercel, How to do this "options='endpoint=ep-shrill-disk-*****'" in laravel,
i tried but not working

from php.

JIeJaitt avatar JIeJaitt commented on June 8, 2024

I encountered the same issue during deployment today and hope that Vercel can promptly upgrade pdo_pgsql to support SNI.

from php.

aungmoe32 avatar aungmoe32 commented on June 8, 2024

I faced same error today. I think it is because of pgsql lib.

from php.

DavidHGJ avatar DavidHGJ commented on June 8, 2024

hi i have a same error, i trying to use laravel with postgres, but when i access database to get data i have this error: "could not find driver (Connection: pgsql, SQL: select * from "users" where "email" = [email protected] limit 1)". Does anyone know how to solve this?

from php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.