I have a database website that a friend of mine designed. I was working in WordPress the other day and it put up an error saying that I was using an old version of PHP and needed to upgrade it to the latest version 7.2. So I went to my host and found an instruction on how to do that. I went into cpanel and was able to change the setting to 7.1, as there was no 7.2. Now I can’t access my website. I’m getting this error:
Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in /home3/july1962/public_html/mdb/Connections/conn_mdb1a.php:11 Stack trace: #0 /home3/july1962/public_html/mdb/showdr.php(1) : require_once() #1 {main} thrown in /home3/july1962/public_html/mdb/Connections/conn_mdb1a.php on line 11
I’ve tried setting it back to the previous versions of PHP, but I’m still getting the error.
Help!
Open you wp-config.php in a Text Editor from your project folder and check your wp-config.php file for the following line:
<?php define('WP_USE_EXT_MYSQL', true); ?>
If you find it, delete the line. Your problem should be fixed.
If you still have the problem, then you incorrectly installed PHP 7.2.x. The error you reported is not possible if you are using PHP 7.2.x and the above line isn’t in wp-config.php.