Several php version on same server

Discussion in 'ISPConfig 3 Priority Support' started by francoisPE, May 15, 2022.

  1. francoisPE

    francoisPE Active Member HowtoForge Supporter

    Hello,
    I have an ispconfig 3.2.8p1 on ubuntu 20.04 with php7.4
    I wanted to upgrade nextcloud. It require php8.0
    I install php8.0 with ppa ondrej
    I set up a php version in ispc.
    Everything seemed ok. I upgrade and turn to php8.0-fpm for that site through ispconfig.

    Nextcloud is running except files are not visible in the browser.

    I dig a bit and found in ispconfig/cron.log
    Code:
    Sun 15 May 2022 07:46:01 AM CEST PHP Warning:  PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib/php/20190902/apc.so (/usr/lib/php/20190902/apc.so: undefined symbol: zif_apcu_store), /usr/lib/php/20190902/apc.so.so (/usr/lib/php/20190902/apc.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    
    apc is deprecated in php8.0
    apcu is well installed for php8.0
    Code:
    ls -lrt /etc/php/*/mods*/apc*
    -rw-r--r-- 1 root root 18 Feb 25  2020 /etc/php/7.4/mods-available/apcu.ini
    -rw-r--r-- 1 root root 31 Feb 25  2020 /etc/php/7.4/mods-available/apcu_bc.ini
    -rw-r--r-- 1 root root 18 Jan 17 17:34 /etc/php/8.1/mods-available/apcu.ini
    -rw-r--r-- 1 root root 18 Jan 17 17:34 /etc/php/8.0/mods-available/apcu.ini
    
    cat /etc/php/7.4/mods-available/apcu*.ini
    ; priority=25
    extension=apc.so
    extension=apcu.so
    
    cat /etc/php/8.0/mods-available/apcu.ini
    extension=apcu.so
    
    I check my cronjob attached to that website, I modify command php to php8.0 when cronjob contains php in it

    I think my problem is around that cache issue
    What should I do ?
     
    Last edited: May 15, 2022
  2. francoisPE

    francoisPE Active Member HowtoForge Supporter

    I found
    I installed few extensions without specifying php version.
    when I had one php version, that was ok, but, with several no !
    Code:
    apt install php-apcu php-memcached php-redis php-soap php-memcache php-imagick php-ldap
    so that, I did
    Code:
        apt remove --purge php-apcu php-memcached php-redis php-soap php-memcache php-imagick php-ldap
        apt install php7.4-apcu php7.4-memcached php7.4-redis php7.4-soap php7.4-memcache php7.4-imagick php7.4-ldap
    
    php is back to life ! ;)
     

Share This Page