We have a PHP based website that we will migrate to another web hosting (AWS). I noticed that mysql commands, e.g. mysql_query()
are still used to execute queries. The latest PHP 5.x based version no longer supports mysql_query()
.
What is the PHP version that we need to configure on the new web host to be able to run mysql_query()
?
The mysql extension was deprecated in php 5.5.0 and removed completely from php 7.0.0
None that you should be using. Any development should be done in 7.2 or a above. 5.x is no longer supported and should be considered not to be secure.
http://php.net/supported-versions.php
You need to go in and replace the outdated mysql_query with modern methods. Upgrading may also break from regex conversions depending on how you did them. PHP developers had years of notice before the old mysql_query functions were deprecated. On a positive note php 7.x is a lot faster and more secure.