Close Menu
IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
  • Home
  • News
  • Blog
  • Selfhosting
  • AI
  • Linux
  • Cyber Security
  • Gadgets
  • Gaming

Subscribe to Updates

Get the latest creative news from ioupdate about Tech trends, Gaming and Gadgets.

    What's Hot

    I switched from Tailscale to this fully self-hosted alternative, and I’m loving it so far

    June 4, 2025

    I Converted My Photos Into Short Videos With AI on Honor’s Latest Phones. It’s Weird

    June 4, 2025

    Don’t let dormant accounts become a doorway for cybercriminals

    June 4, 2025
    Facebook X (Twitter) Instagram
    Facebook Mastodon Bluesky Reddit
    IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
    • Home
    • News
    • Blog
    • Selfhosting
    • AI
    • Linux
    • Cyber Security
    • Gadgets
    • Gaming
    IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
    Home»Selfhosting»How to install PHP 5.6 and 7.0
    Selfhosting

    How to install PHP 5.6 and 7.0

    AndyBy AndyMay 26, 2025No Comments3 Mins Read
    How to install PHP 5.6 and 7.0


    How to Install Multiple PHP Versions on a Debian Server with ISPConfig

    Are you looking to expand your PHP capabilities on your Debian server using ISPConfig? This comprehensive guide not only shows you how to install a range of PHP versions—from 5.6 to 8.4—but also ensures your server remains optimal and secure. By following these precise steps, you can easily manage multiple PHP versions tailored for specific websites, enhancing flexibility and performance. Let’s dive in!

    1. Preliminary Notes

    In this guide, you’ll be adding the SURY repository to install various PHP packages using apt. Ensure not to remove this repository later, as it provides essential updates, including those for OpenSSL. Remember, PHP-FPM works seamlessly with both Apache and Nginx, while FastCGI is exclusive to Apache servers.

    2. Adding the SURY Repository

    Before installing additional PHP versions, first, you need to set up the SURY repository:


    apt-get install -y apt-transport-https lsb-release ca-certificates

    Next, execute the following commands:


    wget -O /etc/apt/trusted.gpg.d/php.gpg >/dev/null 2>&1


    echo "deb $(lsb_release -c -s) main" > /etc/apt/sources.list.d/php.list

    Update the package list:


    apt-get update

    To upgrade any previously installed packages under the new repository, run:


    apt-get upgrade

    3. Installing Additional PHP Versions

    Install only the PHP versions necessary for your projects. Here’s how to install them:

    3.1 Install PHP 5.6


    apt-get install php5.6 php5.6-cli php5.6-cgi php5.6-fpm php5.6-gd php5.6-mysql php5.6-imap php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php5.6-zip php5.6-mbstring php5.6-soap php5.6-opcache libicu65 php5.6-common php5.6-json php5.6-readline php5.6-xml

    3.2 Install PHP 7.0


    apt-get install php7.0 php7.0-cli php7.0-cgi php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-zip php7.0-mbstring php7.0-soap php7.0-opcache php7.0-common php7.0-json php7.0-readline php7.0-xml

    3.3 Install PHP 7.1 through 8.4

    Follow similar commands for each version, replacing the version numbers accordingly:


    apt-get install php7.1…php7.4…php8.0…php8.1…php8.2…php8.3…php8.4

    4. Set Default PHP Versions

    After all installations, ensure the OS default PHP version remains intact. Adjust your settings as follows:


    update-alternatives --config php

    Pick the correct version based on your distribution:

    • Debian 12: PHP 8.2
    • Debian 11: PHP 7.4
    • Debian 10: PHP 7.3

    5. Add PHP Versions in ISPConfig

    To add the new PHP versions in ISPConfig, navigate to System > Additional PHP Versions > Add new PHP version. Insert the relevant configuration for each PHP version, as shown in the example below:


    # For PHP 5.6
    Fast-CGI settings:
    Path to PHP FastCGI binary: /usr/bin/php-cgi5.6

    Make sure to repeat this step for every version you have installed, replacing the version numbers accordingly.

    FAQ

    Question 1: Can I install PHP versions other than those listed?
    Answer 1: Yes, you can add even older or newer versions, but ensure they’re compatible with your applications.

    Question 2: Is it safe to remove the SURY repository later?
    Answer 2: No, removing the SURY repository can lead to issues with future updates for critical packages like OpenSSL.

    Question 3: How do I verify which PHP versions are installed?
    Answer 3: Use the command php -v to check the active version. You can also manage different versions by adjusting the options in ISPConfig.

    Conclusion

    Congratulations! You have successfully set up multiple PHP versions on your Debian server using ISPConfig. By being able to choose the specific PHP version for each website, you enhance the flexibility and performance of your server. If you have further questions or need support, don’t hesitate to reach out to the community or consult official documentation.



    Read the original article

    0 Like this
    install PHP
    Share. Facebook LinkedIn Email Bluesky Reddit WhatsApp Threads Copy Link Twitter
    Previous ArticleHuawei Watch Fit 4 and Watch 5: Design, Battery Life, and More
    Next Article Hackers Use Fake VPN and Browser NSIS Installers to Deliver Winos 4.0 Malware

    Related Posts

    Selfhosting

    I switched from Tailscale to this fully self-hosted alternative, and I’m loving it so far

    June 4, 2025
    Selfhosting

    A domain made my home lab more accessible and more secure at the same time

    June 3, 2025
    Selfhosting

    Music Assistant’s next big hit

    June 3, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    AI Developers Look Beyond Chain-of-Thought Prompting

    May 9, 202515 Views

    6 Reasons Not to Use US Internet Services Under Trump Anymore – An EU Perspective

    April 21, 202512 Views

    Andy’s Tech

    April 19, 20259 Views
    Stay In Touch
    • Facebook
    • Mastodon
    • Bluesky
    • Reddit

    Subscribe to Updates

    Get the latest creative news from ioupdate about Tech trends, Gaming and Gadgets.

      About Us

      Welcome to IOupdate — your trusted source for the latest in IT news and self-hosting insights. At IOupdate, we are a dedicated team of technology enthusiasts committed to delivering timely and relevant information in the ever-evolving world of information technology. Our passion lies in exploring the realms of self-hosting, open-source solutions, and the broader IT landscape.

      Most Popular

      AI Developers Look Beyond Chain-of-Thought Prompting

      May 9, 202515 Views

      6 Reasons Not to Use US Internet Services Under Trump Anymore – An EU Perspective

      April 21, 202512 Views

      Subscribe to Updates

        Facebook Mastodon Bluesky Reddit
        • About Us
        • Contact Us
        • Disclaimer
        • Privacy Policy
        • Terms and Conditions
        © 2025 ioupdate. All Right Reserved.

        Type above and press Enter to search. Press Esc to cancel.