Geeth Janarthanan
asked on
Call to undefined function mysql_connect() in php 7 ubuntu 16.04
Hi,
mysql_connect() not work in php version 7,Am manually install mysql in my pc,It's successfully install but still showing the errors,
How to run mysql_connect in php 7?Is it possible to run?
mysql_connect() not work in php version 7,Am manually install mysql in my pc,It's successfully install but still showing the errors,
How to run mysql_connect in php 7?Is it possible to run?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solved
Most CMS systems, like WordPress handle all this for you, so if you're using a CMS upgrade to latest code base + likely you'll be done.
If you're running many lines of custom PHP, likely best to run phpcs across your code base to surface every problem.
https://github.com/wimg/PH
Then the command you'd used to find all problems will be something like this...
Open in new window
Notice the innocuous "-" after 7.1 which means 7.1 + above, as 7.2 begins the complete PHP session replumbing that will take effect in PHP-8.0, so if you've written custom code, best incrementally ensure all your code works on 7.1 + 7.2, to prepare for 8.0 as session handling may require substantial recoding.
If you have .html files which contain PHP (shudder), then add html to your --extensions list.
The cpus script discovers number of total CPUs, so you can just hardcode this.