AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  PHP-FPM Couldn't start

    Posted Thu January 28, 2021 09:59 AM
    Hello

    I  have issue to start PHP-FPM  and I get the following error
    root:/opt/freeware/sbin:] php-fpm start
    Could not load program php-fpm:
    Dependent module /opt/IBM/ldap/V6.3/lib/libldap.a(libldap-2.4.so.2) could not be loaded.
    File /opt/IBM/ldap/V6.3/lib/libldap.a is not an
    archive or the file could not be read properly.
    System error: Exec format error

    If you need additional info
    root:/opt/freeware/sbin:] rpm -aq | grep php
    php_64-fpm-5.6.32-1.ppc
    php_64-common-5.6.32-1.ppc
    php_64-cli-5.6.32-1.ppc
    root:/opt/freeware/sbin:] rpm -qf /opt/freeware/lib/libldap.a
    openldap-2.4.44-0.1.ppc
    root:/opt/freeware/sbin:] rpm -qa | grep -i -e ldap | sort
    openldap-2.4.44-0.1.ppc
    root:/opt/freeware/sbin:] rpm -q --whatrequires openldap
    php_64-fpm-5.6.32-1.ppc
    php_64-cli-5.6.32-1.ppc
    curl-7.72.0-1.ppc

    Kind Regards
    Alwin

    ------------------------------
    Alwin Alex
    ------------------------------


  • 2.  RE: PHP-FPM Couldn't start

    Posted Thu January 28, 2021 10:56 AM
    The rpms are not from AIX Toolbox. ( rpm -qi php_64-fpm will show the source )
    Check the dynamic linkings of php-fpm binary . ( dump -X64 -Hov /opt/freeware/sbin/php-fpm )

    From the error, it looks like it needs to link to openldap library but linking to IBM ldap.
    Also check you have LIBPATH exported.


    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: PHP-FPM Couldn't start

    Posted Thu January 28, 2021 01:33 PM
    Hello Ayappan

    Thanks for your fast reply, Iam not familiar in this.
    Libpath is this
    root:/home/root:] echo $LIBPATH
    /opt/IBM/ldap/V6.3/lib:/usr/lib:$LIBPATH

    As you said it is linked to ibmldap I guess. How to link to openldap lib?


    root:/usr/lib:] rpm -qi php_64-fpm
    Name : php_64-fpm
    Version : 5.6.32
    Release : 1
    Architecture: ppc
    Install Date: Fri Nov 13 15:14:20 2020
    Group : Development/Languages
    Size : 13359143
    License : PHP and Zend and BSD
    Signature : (none)
    Source RPM : php_64-5.6.32-1.src.rpm
    Build Date : Sat Dec 16 11:06:31 2017
    Build Host : aix51.perzl.org
    Relocations : (not relocatable)
    URL : http://www.php.net/
    Summary : PHP FastCGI Process Manager
    Description :
    PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
    implementation with some additional features useful for sites of
    any size, especially busier sites.

    ------------------------------
    Alwin Alex
    ------------------------------



  • 4.  RE: PHP-FPM Couldn't start

    Posted Fri January 29, 2021 01:20 AM
    LIBPATH having "/opt/IBM/ldap/V6.3/lib" is the problem.
    Having a system wide LIBPATH like this is not a good idea. 

    Openldap & IBM ldap has the same library name "libldap.a" but they are not compatible libraries. Because of the above LIBPATH, php-fpm is linking to IBM ldap provided libldap.a which is a shared object (& not an archive) but php-fpm is built against openldap "libldap.a" which is an archive having "libldap-2.4.so.2", available at /opt/freeware/lib.


    ------------------------------
    Ayappan P
    ------------------------------



  • 5.  RE: PHP-FPM Couldn't start

    Posted Wed February 03, 2021 03:51 AM
    Libpath export but still having same error

    cd /opt/freeware/lib
    ls -l libldap.a
    root:/:] echo $LIBPATH
    /opt/freeware/lib:/usr/lib

    root:/etc/rc.d/init.d:] php-fpm start
    Could not load program php-fpm:
    Dependent module /usr/lib/libldap.a(libldap-2.4.so.2) could not be loaded.
    File /usr/lib/libldap.a is not an
    archive or the file could not be read properly.
    System error: Exec format error


    ------------------------------
    Alwin Alex
    ------------------------------



  • 6.  RE: PHP-FPM Couldn't start

    Posted Wed February 03, 2021 06:00 AM
    You need to make sure openldap is installed for the php-fpm to work.

    ------------------------------
    Ayappan P
    ------------------------------



  • 7.  RE: PHP-FPM Couldn't start

    Posted Wed February 03, 2021 06:14 AM
    Openldap verion 2.4.44 is installed
    root:/:] rpm -aq | grep openldap
    openldap-2.4.44-0.1.ppc

    oot:/opt/freeware/sbin:] rpm -qf /opt/freeware/lib/libldap.a
    openldap-2.4.44-0.1.ppc

    root:/opt/freeware/lib:] ar -X32_64 tv libldap.a
    ar: 0707-100 libldap.a does not exist.

    ------------------------------
    Alwin Alex
    ------------------------------



  • 8.  RE: PHP-FPM Couldn't start

    Posted Thu February 04, 2021 12:16 AM
    You have the rpm installed but the file is removed somehow.
    So you need to reinstall the rpm.

    ------------------------------
    Ayappan P
    ------------------------------



  • 9.  RE: PHP-FPM Couldn't start

    Posted Mon February 22, 2021 06:53 AM
    Thanks Ayappan that works

    ------------------------------
    Alwin Alex
    ------------------------------