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 ?

3
  • 1
    Any other repos? Show your /etc/apt/sources.list and any other files under /etc/apt/sources.list.d/
    – Emii Khaos
    Sep 16, 2013 at 12:01
  • 1
    13.04 has PHP 5.4 by default, so you must have some third-party repos active. Please post your sources lists as suggested by Pazi. Also, what script did you use?
    – zhenech
    Nov 18, 2013 at 7:47
  • Just a question: Why you are not fine with 5.5?
    – frlan
    Sep 2, 2014 at 23:05

2 Answers 2

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`
1
  • 1
    This looks like an answer rather than a comment, so there's no reason to apologize for not making it a comment.
    – Jenny D
    Dec 13, 2013 at 14:24
-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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .