Free hosting uses PHP 8.2
After reading your problem more thoroughly, I think there’s nothing to do with the PHP version. Since you say you migrated the site, I suppose you are using localhost
as your DB host, which is simply incorrect here.
Many websites use MySQL databases to store information and settings. However, there are some reasons why the connection to the database may fail. This article describes some commonly seen error messages when connecting to a database, as well as some general tips to keep in mind when setting up a database connection.
Common Error Messages
Using MySQL is great, but the error message returned if there is an issue logging in to your database can be quite confusing. Here are some commonly seen error…
Both the popular PDO and MySQLi libraries are available on all accounts and PHP versions, which are the libraries all (modern) scripts use to connect to a MySQL database. However, to use a database, you need to configure a few things first.
Before you can use a database, you need to create the database first. You can create a database through your control panel in the section called MySQL Databases. Simply enter a desired name in the text box and click Create Database.
To use the database with…
I also don’t think there’s a thing called PHP 7.8. There’s only 7.4.
9 Likes