Articles

How to Resolve 'Call to undefined function mysql_error()'

After upgrading your app to PHP 7+, there is a very slim chance you will receive the following error:

Fatal error: Uncaught Error: Call to undefined function mysql_error()

This is due to the removal of the mysql_error function from PHP 7+.

If you receive that error, it means some of your app's code, such as a WordPress plugin or theme, is not compatiblele with PHP 7.0.

To resolve this error, you simply need to switch the app to PHP 5.6.

First, open your app's Settings tab in ServerPilot.

Then, click the blue pencil next to your current PHP version.

Select PHP 5.6 from the drop-down list and click Update.


Last updated: January 25, 2017