Updating Docker PHP version to 8

Hey everyone,

I want to apologize ahead of time if this is an ignorant question… But I am not a relatively new developer. So I want to update the PHP version on my Docker Engine Local dev setup from 7.3.x to 8.0.x. So I did in Project Settings/Targets, redeployed and got some errors.

Then, I scrambled to get things back to normal by going back to 7.3.x, rebooting Docker Desktop, restarting the instance and we’re back which is a huge relief.

So before jumping back into these treacherous water I wanted to get advice from those more experience than me on the best approach to update PHP versions in Wappler.

There shouldn’t be any issues with PHP 8

What errors do you got?

Hey @George,

Here are my steps:
Go to: Project Settings/Targets, Docker Engine/Local
Apache, PHP, change from 7.3.x to 8.0.x
Save
Kill all services
Restart Docker Desktop
Deploy

When loading the page, I get the following error:

{“code”:0,“file”:"/var/www/html/dmxConnectLib/lib/db/Connection.php",“line”:85,“message”:“Undefined constant PDO::MYSQL_ATTR_INIT_COMMAND”,“trace”:"#0 /var/www/html/dmxConnectLib/modules/dbconnector.php(12): lib\db\Connection->__construct(Object(lib\App), Object(stdClass), ‘db’)\n#1 /var/www/html/dmxConnectLib/lib/App.php(193): modules\dbconnector->connect(Object(stdClass), ‘db’)\n#2 /var/www/html/dmxConnectLib/lib/App.php(157): lib\App->execSteps(Object(stdClass))\n#3 /var/www/html/dmxConnectLib/lib/App.php(127): lib\App->execSteps(Array)\n#4 /var/www/html/index.php(19): lib\App->exec(Object(stdClass), true)\n#5 {main}"}

Was able to restore the application to working state by changing PHP back to 7.3.x, Killing all services and redeploying.

Please let me know if you need more information.

So it is just docker targets?
and what is the MySQL version yo have chosen?

Yes.

MySQL version 8.0.x. This was not changed. It’s always been this version.

I see something is wrong with the PHP8 docker image indeed - it doesn’t install the needed pdo_mysql extension for some reason. So use for now the older PHP indeed. We will investigate.

Got it. Thanks for looking into it.

This has been fixed in Wappler 3.9.4

This topic was automatically closed after 2 days. New replies are no longer allowed.