You are not logged in.

#1 2021-01-29 09:12:01

a_manthey
Member
Registered: 2017-08-21
Posts: 25

[SOLVED] cannot update nextcloud after update of php

today i got this message from pacman update:

# pacman -Syu
...
:: Verarbeite Paketänderungen...
( 1/21) Aktualisiere cmake                         [######################] 100%
( 2/21) Aktualisiere php                           [######################] 100%
Warnung: /etc/php/php.ini installiert als /etc/php/php.ini.pacnew
( 3/21) Aktualisiere composer                      [######################] 100%
( 4/21) Aktualisiere librsvg                       [######################] 100%
( 5/21) Installiere php7                           [######################] 100%
( 6/21) Installiere php7-gd                        [######################] 100%
( 7/21) Aktualisiere nextcloud                     [######################] 100%
Warnung: Verzeichnis-Berechtigungen unterscheiden sich für /usr/share/webapps/nextcloud/apps/
Dateisystem: 750  Paket: 755
Neue optionale Abhängigkeiten für nextcloud
    php7-apache: to use the Apache web server
    php7-apcu
    php7-intl
    php7-ldap: LDAP authentication
    php7-pgsql: to use the PostgreSQL database backend [ausstehend]
    php7-sqlite: to use the SQLite database backend
( 8/21) Aktualisiere php-apcu                      [######################] 100%
( 9/21) Aktualisiere php-cgi                       [######################] 100%
(10/21) Aktualisiere php-gd                        [######################] 100%
(11/21) Aktualisiere php-igbinary                  [######################] 100%
(12/21) Aktualisiere php-imagick                   [######################] 100%
(13/21) Aktualisiere php-imap                      [######################] 100%
(14/21) Aktualisiere php-intl                      [######################] 100%
(15/21) Aktualisiere php-pgsql                     [######################] 100%
(16/21) Aktualisiere php-redis                     [######################] 100%
(17/21) Aktualisiere php-sqlite                    [######################] 100%
(18/21) Aktualisiere php-xsl                       [######################] 100%
(19/21) Installiere php7-pgsql                     [######################] 100%
(20/21) Aktualisiere phppgadmin                    [######################] 100%
(21/21) Aktualisiere tensorflow                    [######################] 100%
:: Starte post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Probing GDK-Pixbuf loader modules...
(3/4) Update Nextcloud installation
This version of Nextcloud is not compatible with > PHP 7.4.<br/>You are currently running 8.0.1.
This version of Nextcloud is not compatible with > PHP 7.4.<br/>You are currently running 8.0.1.
Fehler: Befehl konnte nicht korrekt ausgeführt werden

same message after installing the missing php7-modules apcu,intl,pgsql and sqlite.

Last edited by a_manthey (2021-01-30 17:56:27)

Offline

#2 2021-01-29 10:39:43

icar
Member
Registered: 2020-07-31
Posts: 86

Re: [SOLVED] cannot update nextcloud after update of php

https://archlinux.org/news/php-80-and-p … available/

Have you tried with those packages?

Offline

#3 2021-01-29 10:53:47

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,052

Re: [SOLVED] cannot update nextcloud after update of php

The apache-php module has been updated as well.
Make sure you update your /etc/httpd/conf/httpd.conf.
However if your php files are not yet updated to PHP8, then you can run PHP7 side by side with PHP8 until they are updated as referred on the front page.

Offline

#4 2021-01-29 11:40:27

knille
Member
Registered: 2014-02-24
Posts: 15

Re: [SOLVED] cannot update nextcloud after update of php

today php7 was upgraded to php8. this broke my apache as in the apache configs there was the php7-module configured. as already mentioned the solution is to install the php7 packages, in my case:

php7
php7-apache
php7-apcu
php7-gd
php7-imagick
php7-intl

nextcloud will still not work afterwards as the php configs have also to be reconfigured. the old php configs are in /etc/php/ and the new ones in /etc/php7/ have to be adapted.

Offline

#5 2021-01-29 15:34:04

a_manthey
Member
Registered: 2017-08-21
Posts: 25

Re: [SOLVED] cannot update nextcloud after update of php

thanks for your hints.
Php7 and its modules are installed, the .ini-files are copied from /etc/php to /etc/php7. But how to configure lighttpd to use php7 for nextcloud and php8 for roundcubemail etc.?

Offline

#6 2021-01-29 17:13:09

progandy
Member
Registered: 2012-05-17
Posts: 4,132

Re: [SOLVED] cannot update nextcloud after update of php

You run php-fpm for php7 and php8 on different unix sockets or ports.
Then in your configuration you do something like this I think.

$HTTP["host"] =~ "(^|\.)roundcube.localhost$" {
    fastcgi.server = ... socket for php8
...
}
$HTTP["host"] =~ "(^|\.)nextcloud.localhost$" {
    fastcgi.server = ... socket for php7
...
}

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2021-01-30 13:45:55

ArchieMeng
Member
Registered: 2019-09-26
Posts: 4

Re: [SOLVED] cannot update nextcloud after update of php

Same here.
When the nextcloud update hook executed, I got errors below.

(1/1) reinstalling nextcloud                                                                         [###########################################################] 100%
warning: directory permissions differ on /usr/share/webapps/nextcloud/apps/
filesystem: 750  package: 755
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Update Nextcloud installation
PHP Warning:  Failed loading Zend extension 'opcache' (tried: /usr/lib/php/modules/opcache (/usr/lib/php/modules/opcache: cannot open shared object file: No such file or directory), /usr/lib/php/modules/opcache.so (/usr/lib/php/modules/opcache.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 'bcmath' (tried: /usr/lib/php/modules/bcmath (/usr/lib/php/modules/bcmath: cannot open shared object file: No such file or directory), /usr/lib/php/modules/bcmath.so (/usr/lib/php/modules/bcmath.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 'curl' (tried: /usr/lib/php/modules/curl (/usr/lib/php/modules/curl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/curl.so (/usr/lib/php/modules/curl.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 'exif' (tried: /usr/lib/php/modules/exif (/usr/lib/php/modules/exif: cannot open shared object file: No such file or directory), /usr/lib/php/modules/exif.so (/usr/lib/php/modules/exif.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 'gd' (tried: /usr/lib/php/modules/gd (/usr/lib/php/modules/gd: cannot open shared object file: No such file or directory), /usr/lib/php/modules/gd.so (/usr/lib/php/modules/gd.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 'gmp' (tried: /usr/lib/php/modules/gmp (/usr/lib/php/modules/gmp: cannot open shared object file: No such file or directory), /usr/lib/php/modules/gmp.so (/usr/lib/php/modules/gmp.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 'intl' (tried: /usr/lib/php/modules/intl (/usr/lib/php/modules/intl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/intl.so (/usr/lib/php/modules/intl.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 'mysqli' (tried: /usr/lib/php/modules/mysqli (/usr/lib/php/modules/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/modules/mysqli.so (/usr/lib/php/modules/mysqli.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 'pdo_mysql' (tried: /usr/lib/php/modules/pdo_mysql (/usr/lib/php/modules/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo_mysql.so (/usr/lib/php/modules/pdo_mysql.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 'zip' (tried: /usr/lib/php/modules/zip (/usr/lib/php/modules/zip: cannot open shared object file: No such file or directory), /usr/lib/php/modules/zip.so (/usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /usr/share/webapps/nextcloud/lib/private/DB/Connection.php:72
Stack trace:
#0 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1449): OC\DB\Connection->connect()
#1 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(892): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/share/webapps/nextcloud/lib/private/DB/Connection.php(202): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): OC\DB\Connection->executeQuery()
#4 /usr/share/webapps/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(217): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(110): OC\AppConfig->loadConfigValues()
#7 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(301): OC\AppConfig->getApps()
#8 /usr/share/webapps/nextcloud/lib/private/legacy/OC_App.php(949): OC\AppConfig->getValues()
#9 /usr/share/webapps/nextcloud/lib/private/Server.php(668): OC_App::getAppVersions()
#10 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#11 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#13 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#14 /usr/share/webapps/nextcloud/lib/private/Server.php(1677): OC\ServerContainer->query()
#15 /usr/share/webapps/nextcloud/lib/private/Server.php(1017): OC\Server->getMemCacheFactory()
#16 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#17 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#19 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#20 /usr/share/webapps/nextcloud/lib/private/Server.php(1977): OC\ServerContainer->query()
#21 /usr/share/webapps/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#22 /usr/share/webapps/nextcloud/lib/private/Server.php(395): OC\Files\View->__construct()
#23 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#24 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#25 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#26 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#27 /usr/share/webapps/nextcloud/lib/private/Server.php(1324): OC\ServerContainer->query()
#28 /usr/share/webapps/nextcloud/lib/base.php(595): OC\Server->boot()
#29 /usr/share/webapps/nextcloud/lib/base.php(1091): OC::init()
#30 /usr/share/webapps/nextcloud/console.php(49): require_once('/usr/share/weba...')
#31 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
#32 {main}
#32 {main}
error: command failed to execute correctly

Last edited by ArchieMeng (2021-01-30 13:50:53)

Offline

#8 2021-01-30 14:03:16

a_manthey
Member
Registered: 2017-08-21
Posts: 25

Re: [SOLVED] cannot update nextcloud after update of php

with a new fastcgi.conf i could access nextcloud server again:

/etc/lighttpd/conf.d/11-fastcgi.conf

server.modules += ("mod_fastcgi")
index-file.names += ("index.php")
$SERVER["socket"] == ":80" {

fastcgi.server = (
    ".php" => (
      "localhost" => (
        "socket" => "/run/php-fpm/php-fpm.sock",
        "broken-scriptfilename" => "enable"
    )))
}

$SERVER["socket"] == ":443"{

fastcgi.server = (
    ".php" => (
      "localhost" => (
        "socket" => "/run/php-fpm/php-fpm.sock",
        "broken-scriptfilename" => "enable"
    )))
}

$SERVER["socket"] == ":8080" {

fastcgi.server = (
    ".php" => (
      "localhost" => (
        "socket" => "/run/php-fpm7/php-fpm.sock",
        "broken-scriptfilename" => "enable"
    )))
}

but i got an internal server error.

Running

/usr/bin/runuser -u http -- /usr/bin/php7 /usr/share/webapps/nextcloud/occ upgrade

gave the error reported by ArchiMeng.

Offline

#9 2021-01-30 14:27:34

ArchieMeng
Member
Registered: 2019-09-26
Posts: 4

Re: [SOLVED] cannot update nextcloud after update of php

ArchieMeng wrote:

Same here.
When the nextcloud update hook executed, I got errors below.

(1/1) reinstalling nextcloud                                                                         [###########################################################] 100%
warning: directory permissions differ on /usr/share/webapps/nextcloud/apps/
filesystem: 750  package: 755
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Update Nextcloud installation
PHP Warning:  Failed loading Zend extension 'opcache' (tried: /usr/lib/php/modules/opcache (/usr/lib/php/modules/opcache: cannot open shared object file: No such file or directory), /usr/lib/php/modules/opcache.so (/usr/lib/php/modules/opcache.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 'bcmath' (tried: /usr/lib/php/modules/bcmath (/usr/lib/php/modules/bcmath: cannot open shared object file: No such file or directory), /usr/lib/php/modules/bcmath.so (/usr/lib/php/modules/bcmath.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 'curl' (tried: /usr/lib/php/modules/curl (/usr/lib/php/modules/curl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/curl.so (/usr/lib/php/modules/curl.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 'exif' (tried: /usr/lib/php/modules/exif (/usr/lib/php/modules/exif: cannot open shared object file: No such file or directory), /usr/lib/php/modules/exif.so (/usr/lib/php/modules/exif.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 'gd' (tried: /usr/lib/php/modules/gd (/usr/lib/php/modules/gd: cannot open shared object file: No such file or directory), /usr/lib/php/modules/gd.so (/usr/lib/php/modules/gd.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 'gmp' (tried: /usr/lib/php/modules/gmp (/usr/lib/php/modules/gmp: cannot open shared object file: No such file or directory), /usr/lib/php/modules/gmp.so (/usr/lib/php/modules/gmp.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 'intl' (tried: /usr/lib/php/modules/intl (/usr/lib/php/modules/intl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/intl.so (/usr/lib/php/modules/intl.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 'mysqli' (tried: /usr/lib/php/modules/mysqli (/usr/lib/php/modules/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/modules/mysqli.so (/usr/lib/php/modules/mysqli.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 'pdo_mysql' (tried: /usr/lib/php/modules/pdo_mysql (/usr/lib/php/modules/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo_mysql.so (/usr/lib/php/modules/pdo_mysql.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 'zip' (tried: /usr/lib/php/modules/zip (/usr/lib/php/modules/zip: cannot open shared object file: No such file or directory), /usr/lib/php/modules/zip.so (/usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /usr/share/webapps/nextcloud/lib/private/DB/Connection.php:72
Stack trace:
#0 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1449): OC\DB\Connection->connect()
#1 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(892): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/share/webapps/nextcloud/lib/private/DB/Connection.php(202): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): OC\DB\Connection->executeQuery()
#4 /usr/share/webapps/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(217): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(110): OC\AppConfig->loadConfigValues()
#7 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(301): OC\AppConfig->getApps()
#8 /usr/share/webapps/nextcloud/lib/private/legacy/OC_App.php(949): OC\AppConfig->getValues()
#9 /usr/share/webapps/nextcloud/lib/private/Server.php(668): OC_App::getAppVersions()
#10 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#11 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#13 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#14 /usr/share/webapps/nextcloud/lib/private/Server.php(1677): OC\ServerContainer->query()
#15 /usr/share/webapps/nextcloud/lib/private/Server.php(1017): OC\Server->getMemCacheFactory()
#16 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#17 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#19 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#20 /usr/share/webapps/nextcloud/lib/private/Server.php(1977): OC\ServerContainer->query()
#21 /usr/share/webapps/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#22 /usr/share/webapps/nextcloud/lib/private/Server.php(395): OC\Files\View->__construct()
#23 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#24 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#25 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#26 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#27 /usr/share/webapps/nextcloud/lib/private/Server.php(1324): OC\ServerContainer->query()
#28 /usr/share/webapps/nextcloud/lib/base.php(595): OC\Server->boot()
#29 /usr/share/webapps/nextcloud/lib/base.php(1091): OC::init()
#30 /usr/share/webapps/nextcloud/console.php(49): require_once('/usr/share/weba...')
#31 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
#32 {main}
#32 {main}
error: command failed to execute correctly

Just now I figured out most of the problems and got nextcloud back to work.
Here is what I went through to fix the issues.
1. in https://wiki.archlinux.org/index.php/Ne … acman_hook document, the wiki recommends users to write a postinstall hook. And in this file, it remained using "php" which caused my previous errors. Just change it to php7
2. I just copy-paste my past php.ini to /etc/php7/. However, there is a line specifying where to find php shared libraries. The line is:

extension_dir = /usr/lib/php/modules

Just change it to:

extension_dir = /usr/lib/php7/modules

3. Don't forget to replace all the needed php libs to php7 libs for they even not in the optional dependency list of nextcloud.
such as php7-intl php7-redis php7-imagick

Offline

#10 2021-01-30 14:34:27

progandy
Member
Registered: 2012-05-17
Posts: 4,132

Re: [SOLVED] cannot update nextcloud after update of php

Do not blindly copy the old php.ini, but merge it with e.g. meld or vimdiff. You'll have to fix e.g. extension_dir.
Edit: You figured it out already.

Last edited by progandy (2021-01-30 14:35:03)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#11 2021-01-30 17:55:41

a_manthey
Member
Registered: 2017-08-21
Posts: 25

Re: [SOLVED] cannot update nextcloud after update of php

I set extension_dir as described by ArchieMeng and got the nextcloud start page again.
But now i had the "Cannot write into config directory!"-error.
Explicitly permitting Nextcloud directories for php-fpm solved it.

Offline

#12 2021-01-31 18:10:11

glenb77
Member
Registered: 2014-10-02
Posts: 57

Re: [SOLVED] cannot update nextcloud after update of php

followed all of the above and nextcloud errors with 'internal server error'. the error log points to old file mcrypt.so as failing. need to fix whatever in nextcloud is calling for this old module. it is not listed as an extension in my php.ini. other php7 things like roundcube and mythweb will run.

i've installed: php7 php7-apache php7-apcu php7-gd php7-imagick php7-intl.

i used apache (httpd.service) to run it with.

if anyone has any idea how to fix and get nextcloud back without reverting php upgrades, please let me know. thanks.

Offline

#13 2021-01-31 19:01:22

glenb77
Member
Registered: 2014-10-02
Posts: 57

Re: [SOLVED] cannot update nextcloud after update of php

please disregard my above post. i solved problem. i had apcu enable and it was configured under conf.d directory, so when i copied over my configuration to etc/php7/conf.d/ directory, nextcloud ran again.

Offline

#14 2021-02-02 09:32:33

Salkay
Member
Registered: 2014-05-22
Posts: 492

Re: [SOLVED] cannot update nextcloud after update of php

Thanks for this thread, especially @ArchieMeng for the detailed actions required.

My cron job and upgrade work fine now, but after a reboot, the Nextcloud webpage itself says "This version of Nextcloud is not compatible with > PHP 7.4. You are currently running 8.0.1."

I'm using Apache. Is there something I need to do to the configuration files? I grepped in `/etc/httpd` but I couldn't see anything obvious specifying which php version to use.

`phpinfo()` shows php 8.0.1.

Last edited by Salkay (2021-02-02 09:33:20)

Offline

#15 2021-02-02 09:43:47

progandy
Member
Registered: 2012-05-17
Posts: 4,132

Re: [SOLVED] cannot update nextcloud after update of php

mod_php7 instead of mod_php in the apache configuration? Or is that php7_module? If you use php-fpm, switch the systemd services and fix the fcgi path for php in apache.

Last edited by progandy (2021-02-02 09:45:04)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#16 2021-02-02 10:50:17

Salkay
Member
Registered: 2014-05-22
Posts: 492

Re: [SOLVED] cannot update nextcloud after update of php

Oops, yes, sorry, you are right. Thank you. I had to change paths in /etc/httpd/conf/extra/php-fpm.conf from the defaults in the wiki. Thank you for the hint!

I'm now getting the same "Internal Server Error" as glenb77 above, and a reference to apcu in the Nextcloud log. For the sake of testing, I disabled apcu, which I had previously enabled as per the Nexcloud docs, and this time Nextcloud progressed.

How can I re-enable apcu? I previously had 'memcache.local' => '\OC\Memcache\APCu', in the Nextcloud config, so presumably something here needs to change?

Finally, just in case this is helpful to others, also remember to give permissions to php-fpm, but this will now need to be edited with systemctl edit php-fpm7.service.

Last edited by Salkay (2021-02-02 21:09:40)

Offline

#17 2021-02-03 00:12:18

seanconn256
Member
Registered: 2019-09-17
Posts: 7

Re: [SOLVED] cannot update nextcloud after update of php

Salkay wrote:

How can I re-enable apcu? I previously had 'memcache.local' => '\OC\Memcache\APCu', in the Nextcloud config, so presumably something here needs to change?

Did you add "extension=acpu" to php7/php.ini ?

Offline

#18 2021-02-03 04:43:36

Salkay
Member
Registered: 2014-05-22
Posts: 492

Re: [SOLVED] cannot update nextcloud after update of php

seanconn256 wrote:

Did you add "extension=acpu" to php7/php.ini ?

Thanks seanconn256! That was it (note the typo: it should be apcu not acpu). FWIW my old /etc/php/php.ini never had that line, so for some reason only the newer php7 seems to need it. Thanks again!

Offline

#19 2021-02-03 15:38:11

husam212
Member
Registered: 2013-07-26
Posts: 2

Re: [SOLVED] cannot update nextcloud after update of php

I've added this package to symlink php7 without the suffix, it might be useful in case php8 is not needed.

Offline

#20 2021-02-23 10:22:28

mb720
Member
Registered: 2020-01-03
Posts: 8

Re: [SOLVED] cannot update nextcloud after update of php

In general, are there ways to avoid breaking Nextcloud after doing "pacman -Syu"?

According to the following comment, Nextcloud breaking on new PHP versions happens a lot: https://help.nextcloud.com/t/this-versi … /105690/15

This Arch Linux bug report was about a the same kind of issue, but is closed: https://bugs.archlinux.org/task/64689

A member of Nextcloud's security team suggests "to specify a closer PHP version" in the PKGBUILD: https://help.nextcloud.com/t/this-versi … 3/65332/10

Offline

Board footer

Powered by FluxBB