I followed this guide on how to install PHP 5.6 from the Remi repository on my Amazon Linux 2 instance. Now I need to connect that installation, which was placed in
/opt/remi/php56/, to already installed apache that was previously using a different version of PHP, which I uninstalled.
How can I do this?
From what I understood, I can accomplish this with either CGI or
mod_php. The old CGI folder was deleted when I uninstalled the other php version. I can't seem to find a way to find or install
mod_php. When I type:
yum install mod_php
I am prompted to download the latest version of PHP from the Amazon repo. The guide I followed already installed a version of PHP that I want.
I've read many guides that just tell you to do:
yum install httpd php
And then just restart the Apache service, and everything works fine. That's how my first installation of the wrong PHP version went as well. Now I have to consider that I install a specific version of PHP from a specific repo which modifies the deployment location, and uninstalled PHP previously, which could have removed certain files.