Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Absolute Beginner Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Absolute Beginner Talk
The perfect starting place to find out more about computers, Linux and Ubuntu.

 
Thread Tools Display Modes
Old May 3rd, 2010   #11
gaellafond
First Cup of Ubuntu
 
Join Date: May 2010
Beans: 1
Re: downgrade php / installing php5.2 next to php 5.3

Thanks for your script, it was helpful.

Btw, I used Hardy instead of Karmic since Hardy as a newest version of PHP (v. 5.2.4-2ubuntu5.10) and the Karmic version was giving me warnings... I also change the mirror, I'm not sure where http://de... is but it's definitely not my country.

Last edited by gaellafond; May 3rd, 2010 at 11:46 PM..
gaellafond is offline   Reply With Quote
Old May 4th, 2010   #12
rubo77
5 Cups of Ubuntu
 
Join Date: Nov 2007
Beans: 26
Re: downgrade php / installing php5.2 next to php 5.3

Quote:
Originally Posted by gaellafond View Post
I'm not sure where http://de... is
sorry, that#s germany.

how can i change that to the local mirror in the script?

is there a system variable?
rubo77 is offline   Reply With Quote
Old May 5th, 2010   #13
Eugene_Bondarenko
A Carafe of Ubuntu
 
Eugene_Bondarenko's Avatar
 
Join Date: Dec 2008
Location: Kyiv, Ukraine
Beans: 101
Re: downgrade php / installing php5.2 next to php 5.3

Thanks for the script, it saved my day!

I am not sure how to put my software sources back though. I checked the list and it has lots of karmic sourced and none lucid ones. I am rather new to ubuntu so I may be misunderstanding something but shouldn't I have lucid sources there to keep all my other stuff updated?
Eugene_Bondarenko is offline   Reply With Quote
Old May 5th, 2010   #14
Inside
First Cup of Ubuntu
 
Join Date: Nov 2005
Beans: 4
Re: downgrade php / installing php5.2 next to php 5.3

Check for the instructions at the bottom of the article.

http://jtrancas.wordpress.com/2010/0...1-and-php-5-3/

It would work for installing karmic PHP packages.

Regards.
Inside is offline   Reply With Quote
Old May 5th, 2010   #15
Eugene_Bondarenko
A Carafe of Ubuntu
 
Eugene_Bondarenko's Avatar
 
Join Date: Dec 2008
Location: Kyiv, Ukraine
Beans: 101
Re: downgrade php / installing php5.2 next to php 5.3

Thanks but I've already installed karmic packages by executing the script posted earlier in this thread. What I am worried about is the current state of my system. The software sources list has all karmic sources and none lucid ones. Also when I check for updates, I get a huge list of recommended updates (including stuff that is definitely not related to php) which I find strange because I updated yesterday.
Eugene_Bondarenko is offline   Reply With Quote
Old May 5th, 2010   #16
Inside
First Cup of Ubuntu
 
Join Date: Nov 2005
Beans: 4
Re: downgrade php / installing php5.2 next to php 5.3

Oops, sorry. Anyway, i also installed it using karmic packages and i dont have that update suggestions in my system.
Inside is offline   Reply With Quote
Old May 8th, 2010   #17
rainboww
First Cup of Ubuntu
 
Join Date: Aug 2009
Beans: 3
Re: downgrade php / installing php5.2 next to php 5.3

Many thanks!
rainboww is offline   Reply With Quote
Old May 10th, 2010   #18
ami7878
First Cup of Ubuntu
 
ami7878's Avatar
 
Join Date: May 2009
Beans: 4
Ubuntu 10.04 Lucid Lynx
Re: downgrade php / installing php5.2 next to php 5.3

Quote:
Originally Posted by rubo77 View Post
the problem now is, that the update manager wants to upgrade php to 5.3 now everytime

to tell the update-manager not to do so, you have to set the php packages to hold with
Code:
for i in $(dpkg -l | grep php|awk '{ print $2 }' ); 
do echo "echo $i hold |sudo dpkg --set-selections"; echo $i hold |sudo dpkg --set-selections; done
or so?
First let me say thanks for the script to downgrade to 5.2. That really saved my day .
I'm working with Drupal and it seams it doesn't support php 5.3.

I do have couple of questions:
1. Do I run the above code, to disable updates, in terminal?
2. What about updates to php 5.2?

Thanks again
ami7878 is offline   Reply With Quote
Old May 10th, 2010   #19
rainboww
First Cup of Ubuntu
 
Join Date: Aug 2009
Beans: 3
Re: downgrade php / installing php5.2 next to php 5.3

After installing php 5.2.10 to hold karmic php packages
Code:
#!/bin/bash
for i in $(dpkg -l | grep php|awk '{ print $2 }' ); 
do echo "echo $i hold |sudo dpkg --set-selections"; echo $i hold |sudo dpkg --set-selections; done
To enable lucid php packages upgrade
Code:
#!/bin/bash
for i in $(dpkg -l | grep php|awk '{ print $2 }' ); 
do echo "echo $i install |sudo dpkg --set-selections"; echo $i install |sudo dpkg --set-selections; done
To set update priority i try this
Code:
#!/bin/bash
PHPLIST=$(for i in $(dpkg -l | grep php|awk '{ print $2 }' ); do echo $i; done)

for i in $PHPLIST ; do echo "Package: $i
Pin: release a=lucid
Pin-Priority: -10
">>/etc/apt/preferences.d/php5.2; done

for i in $PHPLIST ; do echo "Package: $i
Pin: release a=karmic
Pin-Priority: 900
">>/etc/apt/preferences.d/php5.2; done
but it doesn't work

More info here
https://help.ubuntu.com/community/PinningHowto

Last edited by rainboww; May 10th, 2010 at 07:44 AM..
rainboww is offline   Reply With Quote
Old May 10th, 2010   #20
ami7878
First Cup of Ubuntu
 
ami7878's Avatar
 
Join Date: May 2009
Beans: 4
Ubuntu 10.04 Lucid Lynx
Re: downgrade php / installing php5.2 next to php 5.3

Thanks. The code for holding karmic packages worked.
ami7878 is offline   Reply With Quote

Bookmarks

Tags
downgrade, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:35 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry