Fatal error: Uncaught Error: Call to undefined function mysql_connect()
mysql_*
functions have been removed in PHP 7.
You probably have PHP 7 in XAMPP. You now have two alternatives: MySQLi and PDO.
Uncaught Error: Call to undefined function mysql_connect() - WordPress Setup
I found the solution, All you have to do is uncomment these lines in php.ini
extension=mysqli
extension=pdo_mysql
PHP Fatal error : Call to undefined function mysql_connect()
To correct the error, you've basically got two choices, either
1) modify the code to remove references to the mysql extension (and use mysqli or PDO instead), or
2) install an older version of PHP (before PHP7) which supports the mysql extension
FOLLOWUP:
If what you claim is true... that mysql_
functions are working under PHP7, then the most likely explanation for that is that someone installed a third party module/library that exports mysql_
functions.
I believe there was some work done to build such a library, to provide backwards compatiblity. The library would interact with the database using using the newer PHP mysqli_
functions, and provide (mostly) compatible mysql_
functions for legacy applications.
But that's not part of PHP7. That would be a third party add on.
Related Topics
Difference Between Public, Private, and Protected
Using Braces With Dynamic Variable Names in PHP
Why Check Both Isset() and !Empty()
How to Make a Request Using Http Basic Authentication With PHP Curl
How to Call a JavaScript Function from PHP
How to Secure Database Passwords in PHP
Split a Comma-Delimited String into an Array
When Should I Use 'Self' Over '$This'
How to Force File Download With PHP
How to Set Up File Permissions For Laravel
How to Encrypt and Decrypt a PHP String
PHP - Concatenate or Directly Insert Variables in String
Multiple Inputs With Same Name Through Post in PHP
Simplest Way to Profile a PHP Script
How to Bind an Array of Strings With MySQLi Prepared Statement