Web based family history software

Question Update PHP error [SOLVED]

More
3 years 6 months ago - 3 years 6 months ago #1 by SHT
Update PHP error [SOLVED] was created by SHT
Hi!
I update webtrees to latest version 2.0.11 from 2.0.6 or 2.0.7 and got error. I made a mistake and decided to update php right away. After update php i got the following error:
Code:
RuntimeException: could not find driver in /var/www/html/webtrees/app/Http/Middleware/UseDatabase.php:114 Stack trace: #0 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #1 /var/www/html/webtrees/app/Http/Middleware/BadBotBlocker.php(212): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #2 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #3 /var/www/html/webtrees/app/Http/Middleware/RegisterFactories.php(72): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #4 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\RegisterFactories->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #5 /var/www/html/webtrees/vendor/middlewares/client-ip/src/ClientIp.php(81): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #6 /var/www/html/webtrees/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #7 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #8 /var/www/html/webtrees/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #9 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #10 /var/www/html/webtrees/app/Http/Middleware/BaseUrl.php(77): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #11 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #12 /var/www/html/webtrees/app/Http/Middleware/ReadConfigIni.php(69): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #13 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #14 /var/www/html/webtrees/app/Http/Middleware/SecurityHeaders.php(47): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #15 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #16 /var/www/html/webtrees/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #17 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #18 /var/www/html/webtrees/app/Http/Middleware/PhpEnvironment.php(49): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #19 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\PhpEnvironment->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #20 /var/www/html/webtrees/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #21 /var/www/html/webtrees/index.php(57): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest)) #22 {main}

Now:
webtrees 2.0.11
php 7.4.13
mysql 5.7.32

What should I try to do?
Thanks for the answer.

PS: I inserted the code that i got on the Ctrl+U key on the page with an error, since the code was cut off
Last edit: 3 years 6 months ago by SHT.

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #2 by fisharebest
Replied by fisharebest on topic Update error
> update php

PHP has many different modules/extensions.

You didn't upgrade PHP. You replaced an old version with a new version.

But I guess you did not install the same set of extensions with your new version.

Specifically, you are missing PDO and/or PDO-MYSQL

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #3 by SHT
Replied by SHT on topic Update error
Thank you, fisharebest. I will study.

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #4 by SHT
Replied by SHT on topic Update error
I started checking everything in order. Checked that all modules where installed and enabled:
Code:
root@ubuntu:/var/log# php -i | grep -i pdo /etc/php/7.4/cli/conf.d/10-pdo.ini, /etc/php/7.4/cli/conf.d/20-pdo_mysql.ini, API Extensions => mysqli,pdo_mysql PDO PDO support => enabled PDO drivers => mysql pdo_mysql PDO Driver for MySQL => enabled pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock

Restarted apache, mysql. Nothing has changed.

I looked at phpinfo.php
It turned out that apache uses the version php7.3, and installed php7.4

Disabled the old version php:
Code:
sudo a2dismod php7.3

And turned on the new version:
Code:
sudo a2enmod php7.4

Restarted apache:
Code:
systemctl restart apache2


Everything worked.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum