Ubuntu 18. additional PHP8.0 Startup Error

Discussion in 'Installation/Configuration' started by niemand-glaumy, Nov 21, 2021.

  1. Sers!
    Once again, I tried to install some software. It requires PHP>=7.3, so I decided I'd follow a tutorial to add additional PHP versions. I chose PHP8.0, this is the tutorial: https://beyond.lol/ispconfig-mehrere-php-versionen-mit-apt-installieren-auf-ubuntu-18/ (Achtung, Krautspeak!)

    When PHP was default 8.0, ISPConfig was kinda "empty" (apart from header) after login, so I set default PHP back to 7.2 and it worked again. Checking "PHP -v" did display PHP8.0 when it was running, though. It displays 7.2 again after changing defaults.

    Now, in ISPConfig when I set a page to PHP8.0, it throws an Internal Error at me.
    Code:
    Internal Server Error
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    
    Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
    
    More information about this error may be available in the server error log.
    
    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
    This... doesn't help me much so I checked the apache2/error.log, which says a lot, including:
    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20170718/pdo_mysql (/usr/lib/php/20170718/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/pdo_mysql.so (/usr/lib/php/20170718/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20170718/imagick.so (/usr/lib/php/20170718/imagick.so: undefined symbol: zend_string_init_interned), /usr/lib/php/20170718/imagick.so.so (/usr/lib/php/20170718/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'memcache.so' (tried: /usr/lib/php/20170718/memcache.so (/usr/lib/php/20170718/memcache.so: undefined symbol: zend_string_init_interned), /usr/lib/php/20170718/memcache.so.so (/usr/lib/php/20170718/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    - What is " in Unknown at line 0" supposed to mean? Why is it an undefined symbol? How to define it?
    - Is there anything I have to setup in a php.ini file or somewhere?
    - There is a memcache.so and a imagick.so in /usr/lib/php/2021moredatedigits/ - so why is it targeting the older
    - There already is a pdo_mysql.so in /20170718/ - but it seems looking for a file without ".so"?

    "service PHP8.0-fpm status" shows running, no issues listed.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Those errors look like some PHP modules are not installed, or are no usable. You must install needed PHP modules for all PHP versions you use on that host.
    While the tutorial you used looks OK at quick perusal, maybe the additional php versions tutorial on Howtoforge is better?
    If you install a new ISPConfig setup, the ISPConfig automatic install does the additional PHP versions also, so automatic and easy.
     
    niemand-glaumy likes this.
  3. The additional php versions tutorial on howtoforge was for ubuntu 13 at best, I wasn't sure about those still being viable for Ubuntu 18.
    This one: https://www.howtoforge.com/how-to-u...fpm-and-fastcgi-with-ispconfig-3-ubuntu-13.04
    I'll try to follow it and see where it gets me.

    tbh the tutorial section could do with an improvement regarding findability. :)

    Edit: Just found this https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/
    in Documentation. Still it's a bit outdated - is it safe to use anyways?
     
    Last edited: Nov 21, 2021
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    niemand-glaumy likes this.
  5. I solved one issue: I had the paths+filenames.ini in the "Additional PHP" settings. Directories only is key. This didn't solve my issue, though.

    Now, I tried to go the easy way... and disable imagick and memcache in php/8.0/mods_enabled/imagick.ini and memcache.ini. Sadly, this throws me a
    Code:
    .php-fcgi-starter: 15: exec: php8.0-cgi: not found
    instead of all the startup-errors and I still get the 500 error when trying to open a phpinfo(); file on a webspace with php8.0 enabled.

    SOLVED:
    I ran through the tutorial posted by Thom again. I already had the ubuntu stuff chosen instead of the debian stuff.
    Then re-enabled memcache (not memcached!) for 7.2, left it disabled for 8.0.
    imagick is disabled for both.
    In ISPC > Sites > domain.tld > Switched PHP8.0 to PHP-FPM instead of fastcgi. Now the site works.


    Would you please check my apache2/error.log and tell me if I could improve something and how?
    (I removed it, touched it and then restarted apache in one line, no double entries.)
    Code:
    [Tue Nov 23 17:14:07.788668 2021] [ssl:warn] [pid 41021] AH01909: web.echstreme.de:8080:0 server certificate does NOT include an ID which matches the server name
    [Tue Nov 23 17:14:07.789908 2021] [ssl:warn] [pid 41021] AH01909: web.echstreme.de:8081:0 server certificate does NOT include an ID which matches the server name
    [Tue Nov 23 17:14:07.790077 2021] [suexec:notice] [pid 41021] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20170718/pdo_mysql (/usr/lib/php/20170718/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/pdo_mysql.so (/usr/lib/php/20170718/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0
    [Tue Nov 23 17:14:07.917579 2021] [ssl:warn] [pid 41026] AH01909: web.echstreme.de:8080:0 server certificate does NOT include an ID which matches the server name
    [Tue Nov 23 17:14:07.917934 2021] [ssl:warn] [pid 41026] AH01909: web.echstreme.de:8081:0 server certificate does NOT include an ID which matches the server name
    [Tue Nov 23 17:14:07.918126 2021] [:error] [pid 41026] python_init: Python version mismatch, expected '2.7.6', found '2.7.17'.
    [Tue Nov 23 17:14:07.918166 2021] [:error] [pid 41026] python_init: Python executable found '/usr/bin/python'.
    [Tue Nov 23 17:14:07.918168 2021] [:error] [pid 41026] python_init: Python path being used '/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
    [Tue Nov 23 17:14:07.918176 2021] [:notice] [pid 41026] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
    [Tue Nov 23 17:14:07.918178 2021] [:notice] [pid 41026] mod_python: using mutex_directory /tmp
    [Tue Nov 23 17:14:07.928571 2021] [mpm_prefork:notice] [pid 41026] AH00163: Apache/2.4.51 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 mod_python/3.3.1 Python/2.7.17 configured -- resuming normal operations
    [Tue Nov 23 17:14:07.928599 2021] [core:notice] [pid 41026] AH00094: Command line: '/usr/sbin/apache2'
    
     

Share This Page