2

I'm using kubuntu 13.04 I've used a downgrade script to downgrade php 5.4 to 5.3 earlier, and now I deleted the repo and that script, removed php 5.3 and now when installing again, it's installing php 5.5 not 5.4.

How do I install php 5.4 not 5.5 ?

Shehabix
  • 29
  • 1
  • 3

2 Answers2

1

Sorry i wanted to post this as a comment but dont have enough rep. Anyway i had to do the same and followed these steps, below is the following i did to go back to PHP 5.4

remove your php, apache, etc

sudo apt-get purge apache2 php5 libapache2-mod-php5 # add here your server packages

change repositories to raring (with backup)

sudo sed -i.bak "s/saucy/raring/g" /etc/apt/sources.list

update and install server packages

sudo apt-get update
sudo apt-get install apache2 php5 libapache2-mod-php5 phpmyadmin 

change repositories back to saucy

sudo sed -i "s/raring/saucy/g" /etc/apt/sources.list

ignore all current upgrades (package hold)

sudo apt-mark hold `aptitude -F%p --disable-columns search ~U`
-2

You could download the version you want from the PHP Git repository and compile it manually.

The compilation requirements are:

  • autoconf: 2.13+ (for PHP < 5.4.0), 2.59+ (for PHP >= 5.4.0)
  • automake: 1.4+
  • libtool: 1.4.x+ (except 1.4.2)
  • re2c: Version 0.13.4 or newer
  • flex: Version 2.5.4 (for PHP <= 5.2)
  • bison: Version 1.28 (preferred), 1.35, or 1.75

You can download the 5.4 snapshot as source code from git.php.net: 5.4.22

Here is a guide for installing from source: install php5 from source on linux

Article source: php.net.

Jonas D.
  • 105