Skip to content

Instantly share code, notes, and snippets.

@mlazarov
Last active November 16, 2024 16:12
Show Gist options
  • Save mlazarov/b8025c4c4387435ac2a876e6af6d8def to your computer and use it in GitHub Desktop.
Save mlazarov/b8025c4c4387435ac2a876e6af6d8def to your computer and use it in GitHub Desktop.
Cloudpanel support for PHP v5.6 on Debian

Cloudpanel support for PHP v5.6 on Debian

  1. Install Sury repository

curl -sSL https://packages.sury.org/php/README.txt | bash -x
apt update
  1. Change CloudPlanel priority to 500

vim /etc/apt/preferences.d/00packages.cloudpanel.io.pref

[...]
Pin-Priority: 500
  1. Update

apt update

  1. Install PHP5.6

apt install -y php5.6-common php5.6-fpm php5.6 php5.6-zip php5.6-soap php5.6-opcache php5.6-mysql php5.6-cli php5.6-gd php5.6-curl php5.6-xsl php5.6-imap php5.6-intl php5.6-sqlite3 php5.6-bcmath php5.6-mbstring php5.6-readline

  1. Reset CloudPlanel priority to 1000

vim /etc/apt/preferences.d/00packages.cloudpanel.io.pref
[...]
Pin-Priority: 1000
  1. Update

apt update
  1. Copy PHP-FPM configuration

cp /etc/php/8.1/fpm/pool.d/default.conf /etc/php/5.6/fpm/pool.d/default.conf
  1. Change PHP5.6 listen port

vim /etc/php/5.6/fpm/pool.d/default.conf
[...]
listen = 127.0.0.1:10000
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment