Project

General

Profile

Bug #3138

php7-pgsql error

egils - over 2 years ago - . Updated over 2 years ago.

Status:
not-a-bug
Priority:
bug
Assignee:
-
% Done:

0%


Description

I get this error:

dec 02 23:29:06 parabola php-fpm7[17352]: [02-Dec-2021 23:29:06] NOTICE: PHP message: PHP Warning: Unable to load dynamic library 'pgsql' tried: /usr/lib/php7/modules/pgsql (/usr/lib/php7/modules/pgsql: 
/usr/lib/php7/modules/pgsql.so (libldap_r-2.4.so.2: cannot open shared object file: No such file or directory)) in Unknown on line 0

$ pacman -Si php7-pgsql
Repository      : extra
Name            : php7-pgsql
Version         : 7.4.26-2

$ ls /lib/libldap* -l
lrwxrwxrwx 1 root root     18 13 nov 18.37 /lib/libldap.so -> libldap.so.2.0.200
lrwxrwxrwx 1 root root     10 13 nov 18.37 /lib/libldap.so.2 -> libldap.so
-rwxr-xr-x 1 root root 384368 13 nov 18.37 /lib/libldap.so.2.0.200
  • steps to reproduce: # sudo pacman -Syu
  • I expected PHP to be built with a correct path to libldap

History

#1

Updated by bill-auger over 2 years ago

  • Description updated (diff)

i can not reproduce this - can you show what does this command print?

$ lddtree /usr/lib/php7/modules/pgsql.so
#2

Updated by egils over 2 years ago

Hi :)

Thanks for a fast reply.

It says -> None so I guess that is the issue

$ lddtree /usr/lib/php7/modules/pgsql.so 
/usr/lib/php7/modules/pgsql.so (interpreter => None)
    libpq.so.5 => /usr/lib/libpq.so.5
        libssl.so.1.1 => /usr/lib/libssl.so.1.1
        libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1
            libdl.so.2 => /usr/lib/libdl.so.2
                ld-linux-x86-64.so.2 => /usr/lib/ld-linux-x86-64.so.2
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2
            libkrb5.so.3 => /usr/lib/libkrb5.so.3
            libk5crypto.so.3 => /usr/lib/libk5crypto.so.3
            libcom_err.so.2 => /usr/lib/libcom_err.so.2
            libkrb5support.so.0 => /usr/lib/libkrb5support.so.0
            libkeyutils.so.1 => /usr/lib/libkeyutils.so.1
            libresolv.so.2 => /usr/lib/libresolv.so.2
        libldap_r-2.4.so.2 => None
        libpthread.so.0 => /usr/lib/libpthread.so.0
    libc.so.6 => /usr/lib/libc.so.6

I tried these commands, but got exactly the same error.
$ sudo pacman -R php7-pgsql
$ sudo pacman -Syu php7-pgsql
$ systemctl restart php-fpm7.service 

I also tried migrating to php-8. I get exactly the same error with that one too, though...

Here it is in full:

dec 03 09:03:49 parabola systemd[1]: Starting The PHP FastCGI Process Manager...
dec 03 09:03:49 parabola php-fpm[2747]: [03-Dec-2021 09:03:49] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/modules/pdo_pgsql (/usr/lib/php/modules/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo_pgsql.so (libldap_r-2.4.so.2: cannot open shared object file: No such file or directory)) in Unknown on line 0
dec 03 09:03:49 parabola php-fpm[2747]: [03-Dec-2021 09:03:49] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/lib/php/modules/pgsql (/usr/lib/php/modules/pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pgsql.so (libldap_r-2.4.so.2: cannot open shared object file: No such file or directory)) in Unknown on line 0
dec 03 09:03:49 parabola php-fpm[2747]: [NOTICE] fpm is running, pid 2747
dec 03 09:03:49 parabola php-fpm[2747]: [NOTICE] ready to handle connections
dec 03 09:03:49 parabola systemd[1]: Started The PHP FastCGI Process Manager.

I tried reinstalling libldap but to no avail.

#3

Updated by bill-auger over 2 years ago

one thing to note, is that those do not appear to be errors, but warnings - warnings can usually be ignored - that leads to the next question, which would be: "is any functionality actually broken in any noticeable way?"

the broken link is via the 'postgresql-libs' package - the current version (13.4-4) has the correct linkage - which version of 'postgresql-libs' do you have installed?

$ pacman -Ss postgresql-libs
extra/postgresql-libs 13.4-4 [installed]
    Libraries for use with PostgreSQL
#4

Updated by bill-auger over 2 years ago

  • Status changed from unconfirmed to info needed
#5

Updated by egils over 2 years ago

Big thanks for taking the time to point this out. I had postgresql and postgresql-libs in my ignore list and did not realize that that might affect PHP and the bindings.

I removed them from ignore, ran -Syu and everything works again.

Sorry for the noise.

#6

Updated by bill-auger over 2 years ago

  • Status changed from info needed to not-a-bug

Also available in: Atom PDF