Jump to content

Website provider upgrading PHP


Paul-D

Recommended Posts

Hi. My host is upgraiding the server from PHP 5.4.45 to PHP 8. I am running Mysql MYSQL 5.5.62. Is this compatable or will I have to work with new drivers. I will be moving from MYSQL 5.5.62 to 5.7.4-43

mysql_query() and mysql_query(). I was told to upgrade this to PDO and have changed my coding to 
$pdo = connectDB(); $pdo->query().

I have just been told that it is going to be upgraded to MySQLi so my newly created PDO will not work.
Will my old mysql_query() still be valid or will I need to do imidate changes. I do not get a say in things like MySQL and PDO.

Link to comment
Share on other sites

Moving from PHP 5.4.45 to PHP 8 is a significant version upgrade, and it's good that you are considering updating your code accordingly. Here are some points to consider:

1. mysql_query(): The mysql_ functions, including mysql_query(), have been deprecated and removed in later PHP versions. You should replace them with MySQLi or PDO.

2. PDO: While you've updated your code to use PDO, keep in mind that PDO is a database access layer providing a uniform method of access to multiple databases, including MySQL. It should work fine with MySQL 5.7.4-43.

It's important to note that updating to PHP 8 and MySQL 5.7 may introduce other compatibility issues or deprecated features in your code. It's recommended to thoroughly test your application in a development environment before making these changes on your live server.

  • Like 1
  • Great Answer 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.