Downgrade PHP 5.4 to PHP 5.3 on Ubuntu 13.04

enter site
Downgrade PHP 5.4 to PHP 5.3 on Ubuntu 13.04 I have recently had to downgrade my PHP on an ubuntu VM so I can work on some older sites without any issues.

دعوة الخيار ثنائي دلتا Here is a handy script that will downgrade your PHP from PHP 5.4 to PHP 5.3 on Ubuntu 13.04.


get link Just create a shell script on your machine with this as the content and execute it.

see url sudo bash

التداول في الفوركس أدميرال ماركتس #!/bin/bash # # OK, here's how to do the Apt magic to get PHP packages from the precise repositories:   echo "Am I root? " if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] ; then echo " NO!   Error: You must be root to run this script. Enter sudo su " exit 1 fi echo " OK";     #install aptitude before, if you don`t have it: apt-get update apt-get install aptitude # or if you prefer apt-get use: # alias aptitude='apt-get'   # finish all apt-problems: aptitude update aptitude -f install #apt-get -f install     # remove all your existing PHP packages. You can list them with dpkg -l| grep php PHPLIST=$(for i in $(dpkg -l | grep php|awk '{ print $2 }' ); do echo $i; done) echo these pachets will be removed: $PHPLIST # you need not to purge, if you have upgraded from precise: aptitude remove $PHPLIST # on a fresh install, you need purge: # aptitude remove --purge $PHPLIST     #Create a file each in /etc/apt/preferences.d like this (call it for example /etc/apt/preferences.d/php5_2); # #Package: php5 #Pin: release a=precise #Pin-Priority: 991 # #The big problem is that wildcards don't work, so you will need one such stanza for each PHP package you want to pull from precise:   echo ''>/etc/apt/preferences.d/php5_3 for i in $PHPLIST ; do echo "Package: $i Pin: release a=precise Pin-Priority: 991 ">>/etc/apt/preferences.d/php5_3; done   echo "# needed sources vor php5.3: deb precise main restricted deb-src precise main restricted   deb precise-updates main restricted deb-src precise-updates main restricted   deb precise universe deb-src precise universe deb precise-updates universe deb-src precise-updates universe   deb precise multiverse deb-src precise multiverse deb precise-updates multiverse deb-src precise-updates multiverse deb-src natty-backports main restricted universe multiverse   deb precise-security main restricted deb-src precise-security main restricted deb precise-security universe deb-src precise-security universe deb precise-security multiverse deb-src precise-security multiverse   deb-src natty partner   deb precise main deb-src precise main   deb precise-backports main restricted universe multiverse deb-src precise-backports main restricted universe multiverse     deb precise partner deb-src precise partner   " >> /etc/apt/sources.list.d/precise.list   aptitude update   apache2ctl restart   echo install new from precise: aptitude -t precise install $PHPLIST   # at the end retry the modul libapache2-mod-php5 in case it didn't work the first time: aptitude -t precise install libapache2-mod-php5   apache2ctl restart