Cobra Forum

Plesk Panel => Webserver => Topic started by: Suhitha on Jan 21, 2026, 05:50 AM

Title: Website hosted on Plesk server does not work after switching to PHP 7.x: Call to
Post by: Suhitha on Jan 21, 2026, 05:50 AM
Question: Website hosted on Plesk server does not work after switching to PHP 7.x: Call to undefined function mysql_connect()

Applicable to:



Symptoms

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

500 PHP Fatal error:Uncaught Error:Call to undefined function mysql_connect()...


Cause

The PHP function mysql_connect() was removed in PHP 7.0.0.


Resolution

                      Plesk on CentOS/RHEL/CloudLinux/Virtuozzo Linux 7 and on Windows Server

1.Log into Plesk.

2.Go to Domains > example.com > PHP Settings.

3.Switch PHP version to 5.x:

(https://pix.cobrasoft.org/images/2026/01/21/PHP_Settings.png)


        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: