{"id":48,"date":"2022-10-12T03:52:42","date_gmt":"2024-05-19T02:07:05","guid":{"rendered":""},"modified":"2025-02-02T00:46:14","modified_gmt":"2025-02-01T23:46:14","slug":"how-to-install-php-5-6-and-7-0-8-3-with-php-fpm-and-fastcgi-mode-for-ispconfig-3-2-with-apt-on-debian-9-to-12","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-php-5-6-and-7-0-8-3-with-php-fpm-and-fastcgi-mode-for-ispconfig-3-2-with-apt-on-debian-9-to-12\/","title":{"rendered":"How to install PHP 5.6 and 7.0 &#8211; 8.3 with PHP-FPM and FastCGI mode for ISPConfig 3.2 with apt on Debian 9 to 12"},"content":{"rendered":"<h1>\u00a0<\/h1>\n<h2>Introduction<\/h2>\n<p>This tutorial will guide you through the process of installing PHP versions 5.6 and 7.0 through 8.3 with PHP-FPM and FastCGI mode for ISPConfig 3.2 on Debian 9 to 12. ISPConfig is an open-source hosting control panel for Linux which allows you to manage multiple servers from a single control panel.<\/p>\n<h2>Prerequisites<\/h2>\n<p>Before you begin, ensure you have:<\/p>\n<ol>\n<li>A Debian server running version 9 to 12<\/li>\n<li>SSH access to the server<\/li>\n<li>Root or sudo privileges<\/li>\n<\/ol>\n<h2>Step 1: Add PHP Repository<\/h2>\n<p>Add the ondrej\/php repository which provides multiple PHP versions:<\/p>\n<pre><code>sudo apt update\r\nsudo apt install -y software-properties-common\r\nsudo add-apt-repository ppa:ondrej\/php\r\nsudo apt update\r\n<\/code><\/pre>\n<h2>Step 2: Install PHP Versions<\/h2>\n<p>Install the desired PHP versions along with PHP-FPM:<\/p>\n<pre><code>sudo apt install -y php5.6-fpm php7.0-fpm php7.1-fpm php7.2-fpm php7.3-fpm php7.4-fpm php8.0-fpm php8.1-fpm php8.2-fpm php8.3-fpm\r\n<\/code><\/pre>\n<h2>Step 3: Configure PHP-FPM<\/h2>\n<p>Edit the PHP-FPM configuration file for each PHP version:<\/p>\n<pre><code>sudo nano \/etc\/php\/5.6\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/7.0\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/7.1\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/7.2\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/7.3\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/7.4\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/8.0\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/8.1\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/8.2\/fpm\/pool.d\/www.conf\r\nsudo nano \/etc\/php\/8.3\/fpm\/pool.d\/www.conf\r\n<\/code><\/pre>\n<p>Modify the listen directive to use a socket instead of TCP:<\/p>\n<pre><code>listen = \/run\/php\/php{version}-fpm.sock\r\n<\/code><\/pre>\n<p>Replace <code>{version}<\/code> with the respective PHP version (e.g., 5.6, 7.0, etc.).<\/p>\n<p>Save the file and exit the text editor.<\/p>\n<h2>Step 4: Restart PHP-FPM Services<\/h2>\n<p>Restart PHP-FPM services for each PHP version:<\/p>\n<pre><code>sudo systemctl restart php5.6-fpm\r\nsudo systemctl restart php7.0-fpm\r\nsudo systemctl restart php7.1-fpm\r\nsudo systemctl restart php7.2-fpm\r\nsudo systemctl restart php7.3-fpm\r\nsudo systemctl restart php7.4-fpm\r\nsudo systemctl restart php8.0-fpm\r\nsudo systemctl restart php8.1-fpm\r\nsudo systemctl restart php8.2-fpm\r\nsudo systemctl restart php8.3-fpm\r\n<\/code><\/pre>\n<h2>Step 5: Configure FastCGI for ISPConfig<\/h2>\n<p>Configure ISPConfig to use FastCGI and PHP-FPM for each PHP version:<\/p>\n<pre><code>sudo nano \/etc\/apache2\/conf-available\/ispconfig.conf\r\n<\/code><\/pre>\n<p>Add the following lines for each PHP version:<\/p>\n<pre><code>ProxyPassMatch ^\/(.*\\.php(\/.*)?)$ fcgi:\/\/unix:\/run\/php\/php{version}-fpm.sock|fcgi:\/\/localhost\/var\/www\/ispconfig\/{domain}\/web\/$1\r\n<\/code><\/pre>\n<p>Replace <code>{version}<\/code> with the respective PHP version (e.g., 5.6, 7.0, etc.).<\/p>\n<p>Save the file and exit the text editor.<\/p>\n<p>Enable the FastCGI configuration:<\/p>\n<pre><code>sudo a2enconf ispconfig\r\nsudo systemctl restart apache2\r\n<\/code><\/pre>\n<h2>Step 6: Verify PHP-FPM Configuration<\/h2>\n<p>Verify that PHP-FPM is running and listening on the specified sockets:<\/p>\n<pre><code>sudo systemctl status php{version}-fpm\r\n<\/code><\/pre>\n<p>Replace <code>{version}<\/code> with the respective PHP version (e.g., 5.6, 7.0, etc.).<\/p>\n<h2>Conclusion<\/h2>\n<p>You have successfully installed PHP versions 5.6 and 7.0 through 8.3 with PHP-FPM and FastCGI mode for ISPConfig 3.2 on Debian 9 to 12. You can now configure virtual hosts in ISPConfig to use different PHP versions for your websites and web applications.<\/p>\n<p><a href=\"https:\/\/de.netcloud24.com\/\" target=\"_blank\">Windows VPS Deutschland<\/a><\/p>\n<p><a href=\"https:\/\/es.netcloud24.com\/\" target=\"_blank\">Windows VPS Espa\u00f1a<\/a><\/p>\n<p><a href=\"https:\/\/nl.netcloud24.com\/\" target=\"_blank\">Windows VPS Nederland<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">Windows VPS Italia<\/a><\/p>\n<p><a href=\"https:\/\/pt.netcloud24.com\/\" target=\"_blank\">Windows VPS Portugal<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">VPS Windows Italia<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Sverige<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Norge<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS T\u00fcrkiye<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows RDS (Remote Desktop Services)<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Introduction This tutorial will guide you through the process of installing PHP versions 5.6 and 7.0 through 8.3 with PHP-FPM and FastCGI mode for ISPConfig 3.2 on\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-48","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}