I want to install php 5.2.x on my server. I can't find any way to do this. I removed php from the server. My server is running ubuntu.
I tried to follow this one without success. https://askubuntu.com/questions/262368/is-there-any-repository-for-installing-php-5-2-x-on-ubuntu-12-04
Try this:
then you should be able to install php5.2 with apt-get install but that's really old stuff now that PHP 7 has been released !
if that's not possible add these two lines to /etc/apt/sources.list add do a sudo apt-get update
Install Apache
https://manishpaneri.blogspot.in
Install PHP
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
Enabling mod_rewrite
sudo a2enmod rewrite
This will activate the module or alert you that the module is already in effect. To put these changes into effect, restart Apache.
sudo service apache2 restart
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
curl install
sudo apt-get install php-curl
Setting Up .htaccess
First, allow changes in the .htaccess file. Open the default Apache configuration file using nano or your favorite text editor##.
/etc/apache2/sites-available$ sudo gedit 000-default.conf
Inside that file, you will find the <VirtualHost *:80> ....</VirtualHost>. Inside of line
<Directory /var/www/html>
</Directory>
restart Apache.
sudo service apache2 restart
sudo apt-get install php-mcrypt
create the .htaccess file.
sudo nano /var/www/html/.htaccess
To check your hostname run:
hostname hostname -f