Skip to content

Call to undefined function pg_connect() #1137

Answered by deleugpn
eadistar asked this question in Support
Discussion options

You must be logged in to vote

Hi there! Welcome to Bref!

There are a couple of things to unpack from your issue. 1st, version 0.5 is a bit outdated and updating to version ^1.5 could help a bit (I don't remember if PHP 8 is compatible with bref 0.5 to be honest).

pg_connect() is undefined because it is only available as an additional extension. You can check the extensions here: https://bref.sh/docs/environment/php.html#extensions
If you pull in the pdo_pgsql extension into your Lambda, it should solve the issue. You will not need to modify php.ini as the extension layer will be doing that on your behalf.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@eadistar
Comment options

@t-richard
Comment options

Answer selected by eadistar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants