Missing php-pgsql: Call to undefined function pg_connect() #13

Closed
opened 2023-10-08 19:47:51 +00:00 by xtrc · 1 comment

The current build lacks proper support for PostgresSQL which breaks the container when trying to use it:

$ podman logs -f 755ec9181413
+ cp -r storage.skel/app storage.skel/debugbar storage.skel/framework storage.skel/logs storage.skel/purify storage/
+ chown -R www-data:www-data storage/ bootstrap/
+ php /wait-for-db.php
PHP Fatal error:  Uncaught Error: Call to undefined function pg_connect() in /wait-for-db.php:15
Stack trace:
#0 /wait-for-db.php(20): connect()
#1 {main}
  thrown in /wait-for-db.php on line 15

The following Dockerfile fixes the issue by compiling the extension and activating it:

FROM quay.io/zknt/pixelfed:fpm

RUN apt update && apt install libzip-dev zip libicu-dev libpq-dev -y
RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && docker-php-ext-install pdo_pgsql pgsql
The current build lacks proper support for PostgresSQL which breaks the container when trying to use it: ``` $ podman logs -f 755ec9181413 + cp -r storage.skel/app storage.skel/debugbar storage.skel/framework storage.skel/logs storage.skel/purify storage/ + chown -R www-data:www-data storage/ bootstrap/ + php /wait-for-db.php PHP Fatal error: Uncaught Error: Call to undefined function pg_connect() in /wait-for-db.php:15 Stack trace: #0 /wait-for-db.php(20): connect() #1 {main} thrown in /wait-for-db.php on line 15 ``` The following Dockerfile fixes the issue by compiling the extension and activating it: ```Dockerfile FROM quay.io/zknt/pixelfed:fpm RUN apt update && apt install libzip-dev zip libicu-dev libpq-dev -y RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && docker-php-ext-install pdo_pgsql pgsql ```
chris closed this issue 2023-10-09 09:06:13 +00:00
Owner

Thanks for the report! I added your changes to the image.

Thanks for the report! I added your changes to the image.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: dockers/pixelfed#13
No description provided.