I setup a SQL Database with MariaDB on my Raspberry Pi 3B+ and it worked fine.

The PHP Script I wrote uses an old PHP Version, so I wanted to upadte the code to 7.2

But then I can't connect to it anymore. It says connection timed out.

I never had to install/change PHP while installing MariaDB, can it be that I need to install/update my raspberry to PHP 7.2?

Here's my connection code:

    foreach ($db->query('SELECT * from FOO') as $row) {
   $dbh = null;
} catch (PDOException $e) {
   print "Error!: " . $e->getMessage() . "<br/>";

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.