A website hosted on a Plesk server shows the error:
Call to undefined function mysql_connect()
The following error is shown in the Plesk menu Domains > example.com > Applications > Manage Available Applications > application_name:
Warning: The app was not configured: Non-zero exit status returned by script. Output stream: ‘PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /usr/local/psa/var/apspackages/apscatalogJB3Muy.zip33615037-b2fc-e2/cache/scripts/db-util.php:66
On Plesk for Windows, the following error is found in the menu Domains > example.com > Logs:
500 PHP Fatal error:Uncaught Error:Call to undefined function mysql_connect()…
The PHP function
mysql_connect() was removed in PHP 7.0.0.
Plesk on CentOS/RHEL/CloudLinux/Virtuozzo Linux 7 and on Windows Server
Plesk on other Linux OS (CentOS/RHEL/CloudLinux 8, Debian 9/10, Ubuntu 18.04/20.04, AlmaLinux)
On these operating systems, PHP 5.x (and, in some cases, PHP 7.0) cannot be installed because system libraries are not compatible with these outdated and not supported PHP versions.
In this case, use one of the below solutions: