9

First time I've ever needed to ask a question here that I don't think has already been answered.

I've recently been working on transferring over a vBulletin site I run to a new server. Thinking that I was being all ahead of the curve, when I went to install Ubuntu on it recently and saw 14.04 was available, I went for it.

As I should have expected, it's a nightmare. Turns out that vBulletin JUST added support for PHP 5.4 with their last release on the version I run. I honestly don't expect them to ever get it up to PHP 5.5 (what 14.04 installs by default).

Save from going back to 12.04 LTS and starting completely over, is there a way I can downgrade the PHP version installed to 5.4? I saw some threads talking about this for going from 5.4 to 5.3, so I'm hoping its doable.

The simpler you can help me to do this, if possible, the better. I know my way around, but by no means consider myself an expert. Thanks!

EDIT: For clarity. Need to downgrade PHP from 5.5 to 5.4 on 14.04 (Trusty Tahr).

Clarice
  • 91
  • 1
  • 1
  • 3

4 Answers4

5

Install Apache+fcgid+php5.4

sudo apt-get update
sudo apt-get upgrade
sudo apt-get remove --purge `dpkg -l | grep php | grep -w 5.5 | awk '{print $2}' | xargs`
sudo apt-get purge apache2 php5 libapache2-mod-php5
sudo sed -i.bak "s/trusty/precise/g" /etc/apt/sources.list
sudo apt-get update
sudo apt-get install apache2 apache2-suexec libapache2-mod-fcgid php5-cgi
sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-xdebug
sudo sed -i "s/precise/trusty/g" /etc/apt/sources.list
dpkg --get-selections | egrep '^(apache|php)' | sed 's/install/hold/g' | sudo dpkg --set-selections
sudo apt-get update
sudo apt-get install  mysql-client mysql-server phpmyadmin

Then continue setting up the environment as here: http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-12.04

Volker Siegel
  • 13,295
Jorj
  • 151
  • 2
1

There is plenty of options around which @Braiam & @Rinzwind mentioned in comments

Also as a workaround you may want to Check Phpbrew
as it says :

phpbrew builds and installs multiple version php(s) in your $HOME directory.

phpbrew also manage the environment variables, so you can use, switch php version whenever you need.

0

I don't use vBulletin to be honest but in other CMS you can specify the php version in the .htaccess file using a handler with the form :

AddHandler application/x-httpd-php54 .php (for 5.4)

That is the case that 5.4 is also in your computer . I hope we are still discussing the same subject .

0

you can use both php versions parallel using fastcgi.

http://www.jabommi.de/wiki/downgrade-php-5-5-to-5-3-ubuntu-14-with-multiple-php-versions/

jb7AN
  • 1