skip to Main Content

we got a new WebServer with CentOS, Plesk and php-fpm.
Now we don’t get the php extension running.

What we did:

  • installed latest SQL Anywhere 17 (ebf29577)
  • copied php-7.3.0_sqlanywhere_r.so to /opt/plesk/php/7.3/lib64/php/modules/
  • loading php-7.3.0_sqlanywhere_r.so via /opt/plesk/php/7.3/etc/php.d/sqlanywhere.ini
  • this leads to an error:
    WARNING: [pool plesk-php73-fpm.plesk-service.localdomain] child 11616 said into stderr: "NOTICE: PHP message: PHP Warning: request_startup() for sqlanywhere module failed in Unknown on line 0"
    (This leads to php 7.3 fpm is not loading at all)
  • next try was to switch from FPM to CGI: same error
  • module is loadable itself within shell if LD_LIBRARY_PATH was enhanced with path /opt/sqlanywhere17/lib64/
  • some tries getting the cause by strace did not help

Has anybody an idea or maybe even successfully installed php extension.

Thanks
Florian

2

Answers


  1. Chosen as BEST ANSWER

    after a lot of tests we found a solution: in Plesk Domain php settings we had to add:

    [php-fpm-pool-settings]
    env[LD_LIBRARY_PATH]="/opt/sqlanywhere_v2/lib64:$LD_LIBRARY_PATH"
    

    Now all libs are found and it works


  2. For me solution was, creating custom handler:

    plesk bin php_handler --add -displayname "PHP SQLAnywhere 7.4" -path /opt/php-custom-handlers/7.4/php-sqlanywhere.fcgi -clipath /opt/plesk/php/7.4/bin/php -phpini /opt/plesk/php/7.4/etc/php.ini -type fastcgi
    

    php-sqlanywhere.fcgi contents:

    #!/bin/bash
    LD_LIBRARY_PATH=/opt/sqlanywhere17/lib64
    export LD_LIBRARY_PATH
    exec /opt/plesk/php/7.4/bin/php-cgi "$@"
    

    And finally using this handler on domain php settings and adding on additional directives:

    extension=sqlanywhere.so
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search