./concrete/bin/concrete5 crashes

Hi,
I want to update an installation from command line. When I m calling maintanance-mode with ./concrete/bin/concrete5 c5:config -g set concrete.maintenance_mode true it crashes with the following errors:

PHP Fatal error:  Uncaught Error: Undefined constant "Patchwork\Utf8\MB_OVERLOAD_STRING" in /var/www/vhosts/<my-domain>/httpdocs/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php:45
Stack trace:
#0 /var/www/vhosts/<my-domain>/httpdocs/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php(26): Patchwork\Utf8\Bootup::initMbstring()
#1 /var/www/vhosts/<my-domain>/httpdocs/concrete/bootstrap/start.php(19): Patchwork\Utf8\Bootup::initAll()
#2 /var/www/vhosts/<my-domain>/httpdocs/concrete/dispatcher.php(36): require('...')
#3 /var/www/vhosts/<my-domain>/httpdocs/concrete/bin/concrete5(85): require('...')
#4 {main}
  thrown in /var/www/vhosts/<my-domain>/httpdocs/concrete/vendor/patchwork/utf8/src/Patchwork/Utf8/Bootup.php on line 45

I can enter maintanance mode from web-admin-interface.

I copyed the new concrete folder into the web-root. When I start the update command, I got this error:

./concrete/bin/concrete5 c5:update
PHP Fatal error:  Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs) in /var/www/vhosts/<my-domain>/httpdocs/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 86
Whoops\Exception\ErrorException: Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs) in file /var/www/vhosts/<my-domain>/httpdocs/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 86
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/vhosts/<my-domain>/httpdocs/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:86
   | array(1) {
   |   [0]=>
   |   string(157) "Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs)"
   | }

  2. Whoops\Run->handleError() /var/www/vhosts/<my-domain>/httpdocs/concrete/vendor/filp/whoops/src/Whoops/Run.php:486
   | array(0) {
   | }

  3. Whoops\Run->handleShutdown() [internal]:0
   | array(0) {
   | }

My installed version 8.5.2.
The new version 8.5.9.

Based on a Debian GNU/Linux 10 (buster)

A bit php-mix: installed is php 7.4., php 8.023 and php 8.1
If I run 8.0 and 8.1 the site throws an error (which I cant read any more at this update step) and cant displayed. So I switched back to php 7.4.

Any hint what I can do, to solve this errors?
Thanks
trickler

ConcreteCMS v8 is not and will not be PHP8 compatible, so you need to run everything on PHP 7.4, do you still get these errors if you run it specifically with PHP 7.4? These look like errors that PHP 8+ would throw.

The last update - some month ago - runs without any problems. Yes, I think, it was only php 7.
… at this moment I ve got an idea … the php -version from commandline is still 8.0! When you say, concrete5 version 8 will not work with php 8, so the commandline will not work with php 8, too, right? :wink:

I switched the php version on commandline to php74 and the update runs successfully :slight_smile:
Thanks for your help!

1 Like