Trying to make PHP 5.6 available using an EasyApache 4 custom profile, but it says it will not install unsupported packages?
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:
Says,
[quote] If CloudLinux is not an option for you or your customers, there is the option to
That page says,
[quote] All custom profiles save to the /etc/cpanel/ea4/profiles/custom directory.
And gives this example profile file: [quote]{ "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", "..." ] }
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: 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: [quote] { "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 }
However, in EasyApache 4, though I can see the new profile option, it says: [quote] This profile includes the following packages that are not supported on this server:
And if I try to Customize the profile, PHP 5.6 and PHP 7.0 do not show up under Customize>PHP Versions. 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?
And gives this example profile file: [quote]{ "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", "..." ] }
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: 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: [quote] { "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 }
However, in EasyApache 4, though I can see the new profile option, it says: [quote] This profile includes the following packages that are not supported on this server:
- php56
- php70
And if I try to Customize the profile, PHP 5.6 and PHP 7.0 do not show up under Customize>PHP Versions. 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?
-
Hey there! Unfortunately, no, there's not going to be a way to force that to work even with a custom profile. The best option would be to move the accounts that need the older version to a machine running the CloudLinux operating system. That will allow them to use the older versions in a more secure fashion with CageFS. 0 -
I agree with @cPRex, if you need to use older PHP versions/modules, using CloudLinux is the best way to go. 0 -
Hey there! Unfortunately, no, there's not going to be a way to force that to work even with a custom profile. The best option would be to move the accounts that need the older version to a machine running the CloudLinux operating system. That will allow them to use the older versions in a more secure fashion with CageFS.
Thank you. What about CentOS 7? This article says PHP 5.6 is available on CentOS 7.0 -
Also, CentOS 7 has a very short life at this point, so it doesn't make sense to me to spend time building a new system on an operating system with limited support. 0 -
I had a site running some really old PHP code and was struggling after a few years away from programming to adapt it to PHP 8.x I started a ChatGPT session, and pasted in the old code asking AI to re-write my code for PHP 8. As if by magic it re-wrote the code and even made it more efficient. I copied and pasted that back into a dev account running PHP 8.1 and the code worked a treat. Actually blew my mind! 0
Please sign in to leave a comment.
Comments
7 comments