mysql_connect() error in codeIgnitor hosting suddenly

Avatar
  • Answered
I hosted a codeignitor website few days ago. it was working good. but suddenly it is giving issue for mysql as follows
Uncaught Error: Call to undefined function mysql_connect()
The website is working fine ni localhost and another test server.
What is causing the problem and what is the solution.
Avatar
Scott
Hello,

Thank you for your question regarding the mysql_connect error you are getting on your site. The server says that your PHP version for that site is PHP 7.0 the mysql set of functions has been removed as of that version. You will need to change over to the mysqli API or change the PHP version to an older one.

Kindest Regards,
Scott M