[SOLVED] Exceptions after server update

Hello all!

Yesterday our server (ubuntu 16.04) was updated by “dist-upgrade” which installed php7.3. After manually installation of missing php-modules we got exceptions

Warning: "continue" targeting switch is equivalent to "break".
Did you mean to use "continue 2"? in ...

two core files are involved:


In our flow application based on flow 5.2 I could fix that by using “break” (line 164 in DataMapper) and “continue 2” (line 205 in DataMapper and line 311 in Compiler).

In another application bases on flow 4.2 additional exceptions are thrown in
Doctrine\ORM\UnitOfWork.php. Here any tries of fixing it end up in
“could not find driver” in Doctrine/DBAL/Driver/AbstractMySQLDriver.php

Unfortunately “composer update” fails with same error.

Two questions about this:

  • how can I check which php version uses the flow application und
  • how I get the exact flow version on command line or is the only way to look into “composer.json”?

Very annoying: the flow 4 bases application is heavly used by our company…

Any tipps?

Hey Frank,

Thanks for your post, and sorry to hear that you had troubles updating!

I just checked the source code, and came across the following commit: https://github.com/neos/flow-development-collection/commit/952609c654abb9ed64e693099ea1a4c029c2beeb

Which should be included in the following versions:

Can you post exactly which version you are using? (e…g. by checking the output of composer info).

All the best,

Hello Sebastian,

thanks a lot for your help!

Composer says

neos/flow 4.2.14 and
neos/flow 5.2.1 respectively



yep, then you need to upgrade to at least Flow 5.2.2 :slight_smile:

Let us know if you encounter further problems!

All the best,

Hello Sebastian,

after getting composer working again, I ran “composer update” which updated
several packages.

“composer info” says now “neos/flow 5.2.3”.
After that I ran “./flow flow:cache:flush”, call to our flow app
in the browser ends up like the flow 4.2 application now:

An exception occurred in driver: could not find driver
Exception Code	0
Exception Type	Doctrine\DBAL\Exception\DriverException
Thrown in File	Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
Line	125

Nested Exception
could not find driver
Exception Code	0
Exception Type	Doctrine\DBAL\Driver\PDOException
Thrown in File	Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
Line	50

Nested Exception
could not find driver
Exception Code	0
Exception Type	PDOException
Thrown in File	Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
Line	46

In fact no libs were updated …

Additional Info: when I ran a CommandController which uses dababase it works!?

thanks again for your help!

Hey Frank,

I initially did not have an idea, but your following hint gave me a clue:

I think that you are missing the corresponding pdo_mysql PHP extension in the web mode, while it is installed in CLI.

Further checking the source code of Doctrine, where the exception occurs, confirms this suspicion I think, as the error occurs at exactly this line where the PDO connection is built by the PHP PDO extension:

So, please ensure you have the PDO_MySQL Extension loaded both in CLI and in your PHP Web Server. How this works exactly depends a little on your setup, i.e. whether you run php_fpm or mod_php in Apache - but using phpinfo() , you should see that when called from CLI, the extension is loaded (e.g. by running php -i | grep -i pdo and looking for a line pdo_mysql); while from the web, you probably won’t find this line.

All the best, I hope this helps :heart: :upside_down_face:


Hella Sebastian!

I’ve check “pdo_mysql” - as I know it’s part of “phpX.X-mysql” on ubuntu.
That was installed antomatically…

But: ahhhhhhhh! PHP CLI used PHP7.3 and apache used still PHP7.2!!
What a shit…
After a2dismod php7.2 and a2enmod php7.3 both applications are working now.

Your essential “keyword” was to look for “pdo_mysql” as a starting point.
Therefore I used dpkg -l | grep pdo and dpkg -l | grep mysql without further reading your post :wink:

Thank’s a lot, Seabstian! :slight_smile:

Important for those who run in an equal situation: the pitfall is this on ubuntu:

The following package was automatically installed and is no longer required:
Use 'apt autoremove' to remove it.

when doing a apt-get dist-upgrade while all other php7.2 modules are still on system AND usable!