I know that PHP 5.6 is a security risk, but I have some very old sites that use mysql_connect(), so I would like to install it on an Ubuntu machine. I'm trying to install it with an EasyApache 4 custom profile, but it says it will not install unsupported packages. What else do I need to do to get cPanel to make PHP 5.6 available, other than creating a custom EasyApache 4 profile? I am using cPanel Ubuntu 20.04.
For some background, this article says that PHP 5.6 is not available in Ubuntu:
It is installable in CentOS. However this article:
Says,
documentation.cpanel.net
That page says,
allphp-opcache.json
allphp.json
default-nginx.json
default.json
mpm_itk.json
nophp.json
worker.json
I made a folder, /etc/cpanel/ea4/profiles/custom, and made a file myprofile.json (based on default.json) containing:
Is there something I can to force cPanel to add these PHP versions as installable options? What other steps do I need to take to make PHP 5.6 available?
For some background, this article says that PHP 5.6 is not available in Ubuntu:
It is installable in CentOS. However this article:

Removal of PHP 5.6 and PHP 7.0 in EasyApache Profiles | cPanel Blog
Unsupported versions of PHP will be removed from EasyApache 4 in 2020. Find out if this affects you and what you need to do.
blog.cpanel.com
Says,
And links here:If CloudLinux is not an option for you or your customers, there is the option to create a custom EasyApache 4 profile and continue to use PHP 5.6 and 7.0, but we do not recommend it.
EasyApache 4 - Create a Profile - EasyApache 4 - cPanel Documentation
That page says,
And gives this example profile file:All custom profiles save to the /etc/cpanel/ea4/profiles/custom directory.
There is a file, /etc/cpanel/ea4/profiles/pkg-manifest.json. There is also a sub-folder /etc/cpanel/ea4/profiles/cpanel, which contains these files:{
"version":"1.2",
"name":"SuperHost Profile",
"tags":[
"Apache 2.4",
"PHP 7.0",
"tomorrow comes knocking",
"..."
],
"desc":"This profile will allow you to have super high density on your system",
"pkgs":[
"ea-mod_xyz",
"ea-php70",
"ea-php71",
"ea-your_frog",
"..."
]
}
allphp-opcache.json
allphp.json
default-nginx.json
default.json
mpm_itk.json
nophp.json
worker.json
I made a folder, /etc/cpanel/ea4/profiles/custom, and made a file myprofile.json (based on default.json) containing:
However, in EasyApache 4, though I can see the new profile option, it says:{
"desc" : "A custom profile to add PHP 5.6 and PHP 7.0.",
"name" : "cPanel with PHP 5.6",
"pkgs" : [
"ea-apache24",
"ea-apr",
"ea-apr-util",
"ea-apache24-mod-mpm-prefork",
"ea-apache24-mod-ruid2",
"ea-apache24-mod-ssl",
"ea-apache24-mod-deflate",
"ea-apache24-mod-expires",
"ea-apache24-mod-headers",
"ea-apache24-mod-proxy",
"ea-apache24-mod-proxy-fcgi",
"ea-apache24-mod-cgi",
"ea-apache24-mod-unique-id",
"ea-apache24-mod-security2",
"ea-php56",
"ea-php70",
"ea-php81",
"ea-php81-php-bcmath",
"ea-php81-php-calendar",
"ea-php81-php-curl",
"ea-php81-php-ftp",
"ea-php81-php-gd",
"ea-php81-php-iconv",
"ea-php81-php-imap",
"ea-php81-php-mbstring",
"ea-php81-php-mysqlnd",
"ea-php81-php-pdo",
"ea-php81-php-posix",
"ea-php81-php-sockets",
"ea-php81-php-xml",
"ea-php81-runtime",
"ea-php81-php-fpm",
"ea-php81-php-zip",
"ea-php80",
"ea-php80-php-bcmath",
"ea-php80-php-calendar",
"ea-php80-php-curl",
"ea-php80-php-ftp",
"ea-php80-php-gd",
"ea-php80-php-iconv",
"ea-php80-php-imap",
"ea-php80-php-mbstring",
"ea-php80-php-mysqlnd",
"ea-php80-php-pdo",
"ea-php80-php-posix",
"ea-php80-php-sockets",
"ea-php80-php-xml",
"ea-php80-runtime",
"ea-php80-php-fpm",
"ea-php80-php-zip"
],
"tags" : [
"Apache 2.4",
"PHP 8.0",
"PHP 8.1"
],
"version" : 1
}
And if I try to Customize the profile, PHP 5.6 and PHP 7.0 do not show up under Customize>PHP Versions.This profile includes the following packages that are not supported on this server:
The system will not install the unsupported packages. Do you wish to continue?
- php56
- php70
Is there something I can to force cPanel to add these PHP versions as installable options? What other steps do I need to take to make PHP 5.6 available?
Last edited by a moderator: