6

I just upgraded to ubuntu 13.10.. I was working on a project that uses php 5.3 and now phpmyadmin is not working and when i try to open a page i see a ton of warning and the sign in page doesnt sign me in.. how can I downgrade ? I tried removing php and phpmyadmin and re-installing but nothing happened. this is what i get when i try php-v

PHP 5.5.3-1ubuntu2 (cli) (built: Oct 9 2013 14:49:12) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

  • You could try removing the official Ubuntu versions, and installing php from source, although that will probably be a pain. Much better option would be to fix your code to work with php 5.5, unless you're not allowed to do that. – devius Oct 20 '13 at 12:19
  • It is a pain, I spent about 2 hours and nothing good happened, I'll give it a shot tomorrow again. guess I'm not allowed to do that :/ – Kmelkon Oct 20 '13 at 13:09
  • 1
    Additional tip that might help avoid this in the future: You guys know that you can lock a package so that it won't get updated or even suggested by the system if there are any updates? You can do this using the more advanced tool such as the Synaptic Package Manager. – Marky Oct 23 '13 at 6:57
  • @Marky actually I just knew that from another answer, and I'll be using this method from now on if I need it. thanks – Kmelkon Oct 24 '13 at 13:34
1

I think best solution for now (and future too) is Vagrant. Vagrant can make lightweight, reproducible, and portable development environments. All what you need is in Ubuntu software center. So installation is very easy.

In next step you need vagrant boxies with your dev environments. Go to https://puphpet.com/ and configure box what you need (ex. PHP 5.3) and download. Vagrant box run with this command

vagrant up <box file name>
| improve this answer | |
  • nice! this seems like a viable solution although for the time being I'm dual-booting, guess I'll have to give this a try. thanks a lot – Kmelkon Oct 24 '13 at 11:58
4
  1. Ondrej php5-oldstable packages, would be a good option, but at the moment they don't work on Saucy Salamander (debphp.org/ubuntu-saucy-support.html). You could just wait.
  2. You can compile PHP on your own.
  3. Easy solution would be to temporarly switch to old (raring) repositories, install PHP (5.4), Apache (2.2), etc and lock package versions (so it won't be upgraded anymore):

Please consider it as a risky operation, as you might loose your settings and break your system. I did not test all the lines, so please tell me if I have to adjust something

# upgrade system, so you can add to ignore all updates later
sudo apt-get update
sudo apt-get upgrade

# 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 #add here packages you need and make sure you install php5.4 and apache2.2

# 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`
| improve this answer | |
  • 1
    thank you for the response and sorry about the late reply but I had to fix the problem as fast as I can so I dual booted Ubuntu 13.10 with 13.04 this sounds like a dumb solution but it was all I could come up with after I wasted a couple of hours, guess I'll try your solution next time, since eventually I have to move to 13.10.. – Kmelkon Oct 24 '13 at 11:56
2

debian has an easy method to this problem. And it more than likely would work for ubuntu. you open the older repository in sources.list and pin the package desired and give it a higher Priority and it will pull those packages on the list that u need. documentation here , http://www.leonli.co.uk/blog/debian-7-0-wheezy-php-5-3-install-downgrade-from-php5-4/.

| improve this answer | |
  • 4
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Braiam Oct 28 '13 at 17:25
0

xampp (for linux) might be the easiest solution in this case: http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.7.7/

I also updated to ubuntu 13.10 today, my project is also not compatible with php 5.4. Configuring now, hope things will be fine with xampp.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.