Problems with PHP downgrade.

Discussion in 'Server Operation' started by FeraTechInc, Jun 8, 2010.

  1. FeraTechInc

    FeraTechInc ISPConfig Developer ISPConfig Developer

    So I updated my system from Ubuntu Karmic x64 to Lucid keeping all the files as recommended.

    However, I soon realized PHP 5.3 is not compatible with a lot of client sites. So I had to downgrade to 5.2

    Here is the walkthrough I used:

    However, only one strange thing resides.

    Any pictures resized using php5-imagick are eigther distorted or have off colors.

    Has anybody ever come across this issue?
  2. longvnit

    longvnit New Member

    You can try this tips, i tried and work fine

    # remove all php packge
    sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
    # use karmiс for php pakage
    # pin-params:  a (archive), c (components), v (version), o (origin) and l (label).
    echo -e "Package: php5\nPin: release a=karmic\nPin-Priority: 991\n"  | sudo tee /etc/apt/preferences.d/php > /dev/null
    apt-cache search php5-|grep php5-|awk '{print "Package:", $1,"\nPin: release a=karmic\nPin-Priority: 991\n"}'|sudo tee -a /etc/apt/preferences.d/php > /dev/null
    apt-cache search -n libapache2-mod-php5 |awk '{print "Package:", $1,"\nPin: release a=karmic\nPin-Priority: 991\n"}'| sudo tee -a /etc/apt/preferences.d/php > /dev/null
    echo -e "Package: php-pear\nPin: release a=karmic\nPin-Priority: 991\n"  | sudo tee -a /etc/apt/preferences.d/php > /dev/null
    # add karmic to source list
    grep 'main restricted' /etc/apt/sources.list|grep -v "#"| sed s/lucid/karmic/g | sudo tee /etc/apt/sources.list.d/karmic.list > /dev/null
    # update package database (use apt-get if aptitude crash)
    sudo apt-get update
    # install php
    sudo aptitude install -t karmic php5-cli php5-cgi
    # or (and) sudo apt-get install -t karmic  libapache2-mod-php5
    sudo aptitude hold `dpkg -l | grep php5| awk '{print $2}' |tr "\n" " "`

Share This Page