Skip to content
Menu
Marius Serbanica – Tech Blog
  • My Tech Blog
  • About me
  • Contact Me
  • Curriculum Vitae
  • Projects
  • Current Projects List
  • Certifications
  • Home Lab
  • Self-Hosted
  • Linux Cheat Sheet
  • Linux Commands
  • Privacy Policy
  • Site Map
Marius Serbanica – Tech Blog
May 20, 2023

Installing PHP 5.6 (because of reasons…)

Now, if you’re in the same boat as me, and have an old website database that’s been offline for more than 10 years, you will probably run into all sorts of issues recovering the data and re-establishing your website.

15 years ago I created a website for an online community, with a forum and all the jazz included but the problem is that the website is based on a (you guessed it) CVS. This particular CVS (PHP-Fusion 7) is on its 9th version at this point, and since version 7, it has removed support for PHP 5 and MySQL.

So, what I will be doing is, installing Almalinux on a VM (because Almalinux is one of the few distros that still support this version of PHP, alongside CentOS), establishing a webserver, PHP 5 and an older version of MySQL on this distro, deploy my website, recover my database, convert my database and de-deploy it with the newest version of the CVS.

Easy, right? …RIGHT? *screaming internally*

Here I will list all the steps for PHP 5.6 installation on Almalinux (I won’t bother explaining how to install Almalinux on a VM, here)

To install PHP 5.6 on AlmaLinux 8, first enable epel repository.

dnf install -y epel-release

Install remi repository.

dnf install http://rpms.remirepo.net/enterprise/remi-release-8.rpm

Now you can install PHP 5.6…

dnf install php56

You can execute PHP with the following command:

php56

If you want PHP 5.6 to work with the command “php”, then edit:

nano ~/.bashrc

At the end of the bashrc, add:

source /opt/remi/php56/enable

Log off and log in to the server.

Or you can create a symlink:

ln -s /opt/remi/php56/root/usr/bin/php /usr/bin/php

To make PHP work with Apache, run Install Apache with

dnf install httpd

Install php-fpm:

dnf install php56-php-fpm

Enable and restart Apache:

systemctl enable php56-php-fpm
systemctl enable httpd
systemctl restart httpd
systemctl restart php56-php-fpm

php-fpm pool config file available at -> /etc/opt/remi/php56/php-fpm.d/www.conf

That is all! I might write a post about installing MySQL 4.1 on Almalinux as well (or might just add it to this post).
Good luck!

Share on Social Media
x facebook linkedin

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Join my LinkedIn Network.

Recent Posts

  • Kubernetes cluster. Why and how
  • Installing GNU-World on ircu2
  • Replacing Cloudflare Tunnel with Tailscale on a VPS
  • KASM – My main workspace RBI
  • Transforming a Mini PC into a Powerful Home Network Hub / Router/ Firewall with OPNsense

Archives

  • February 2025
  • January 2025
  • October 2024
  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023

Categories

  • How-To
  • Tech Industry
  • Tech, but personal
  • Tutorials

Recent Comments

  1. IRC Lamer on Installing GNU-World on ircu2
  2. severus2231 on Transforming a Mini PC into a Powerful Home Network Hub / Router/ Firewall with OPNsense
  3. admin on Mounting a NAS (Network Attached Storage) device on Linux
  4. abL on Mounting a NAS (Network Attached Storage) device on Linux
  5. Alin R on Cleaning up your Linux OS.
Social Media
Find me on social media
Facebook Twitter Instagram LinkedIn

©2025 Marius Serbanica – Tech Blog