cat bring my nextcloud instance to PHP8.1

Discussion in 'ISPConfig 3 Priority Support' started by muekno, May 17, 2024.

  1. muekno

    muekno Active Member HowtoForge Supporter

    Sorry me again
    Server is Debian 11
    ISPConfig 3.2.11p2
    nextcloud latest, runing fine
    under sites phpversion is set 8.1
    I think its running 8.1, otherwise I wouldn't be able to upgrade
    but I should recreate some indices

    <code/>
    xxxcloud@mike:~/web$ php occ db:add-missing-indices
    This version of Nextcloud requires at least PHP 8.0<br/>You are currently running 7.4.33. Please update your PHP version.nextclo
    xxxcloud@mike:~/web$ php occ db:add-missing-indices
    This version of Nextcloud requires at least PHP 8.0<br/>You are currently running 7.4.33. Please update your PHP
    version.xxxcloud@mike:~/web$
    </code>
    Where can I see which version is really running? I think it is 8.1
    Why does nexcloud mean it is running 7.4.33?

    custom php.ini
    <code/>
    opcache.enable=1
    opcache.enable_cli=1
    opcache.memory_consumption=128
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=10000
    opcache.revalidate_freq=1
    opcache.save_comments=1
    memory_limit = 512M

    memory_limit = 2048M
    upload_max_filesize = 2000M
    </code>
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Use the correct PHP version for your command instead of php use e.g.:

    /usr/bin/php8.1 occ db:add-missing-indices
     
  3. muekno

    muekno Active Member HowtoForge Supporter

    thank you.
     
  4. muekno

    muekno Active Member HowtoForge Supporter

    sorry thats not all, nextcloud requires that command should be under the websites user. I have that user in a Chroot Shell, but this user has no access to php8.1, only root has access
     
  5. muekno

    muekno Active Member HowtoForge Supporter

    Solved I final got it, login with root, but then
    sudo -u nextcloud /usr/bin/php8.1 occ db:add-missing-indices
    where nextcloud is chrooted users name
     
  6. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    if you installed that version of ispconfig using the auto-installer then php8.1 should already be included in the jailkit config files
    you'd just need to add it to the server config: system - server config - <host> - jailkit - Jailkit chroot app sections PHP8_1 for everyone on that server, or in that websites options tab, same setting, down near the bottom.. Jailkit chroot app sections for just that website.

    then once it's updated the jailkit, ssh in as the user again..
    you could also then set that php version as an alias for the php command in the .bashrc file in that users home folder... so you can just use 'php' instead of the full path and version '/usr/bin/php8.1'....
     
    till likes this.
  7. muekno

    muekno Active Member HowtoForge Supporter

    The system was setup about 2 years ago, without the autoinstaller and updated since that time. But thank you, for that information I will try.
    Regards
    Rainer
     

Share This Page