LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-06-2004, 11:29 AM   #1
waffe
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 69

Rep: Reputation: 15
Installing newer version of php (apt-get)


Hi

I currently have php 4.1.2 installed on my Debian 3 Linux box. I would like to upgrade to the latest version, which is 4.3.4. I have tried using, "apt-get install php4" but it says I already have php4 installed. I then ran "apt-get update" and "apt-get upgrade", and then run apt-get install php4 again to get the same message. Last I tried "apt-get remove php4" and then "apt-get install php4" only to see the same php 4.1.2 was installed again.

How do I install the latest and greatest version of php?

Thanks

Last edited by waffe; 03-06-2004 at 11:33 AM.
 
Old 03-06-2004, 12:00 PM   #2
Qzukk
Member
 
Registered: Jun 2003
Posts: 132

Rep: Reputation: 15
Rather than thinking of debian in terms of version numbers, you need to start thinking in terms of release stages. Don't think "Debian 3", think "Debian Stable". The "Stable" (aka Woody) means that every package you have access to has undergone significant testing, and installing any given package will almost never break your system.

Pro: You can automate upgrades and get the latest security fixes without worrying that something will break.
Con: It will take months from now before php 4.3.x will appear in Stable, if it does at all (enough changes have been made that might break existing .php code... you see where this is going, right?)

So, what is there to do? You'll have to get php from a higher stage. "Testing" (aka Sarge) is the next step up. According to http://packages.debian.org/testing/web/ php4 is at 4.3.3

Pro: Newer packages than Stable
Con: *no security fixes*

If not having up-to-date security fixes scares you (and it should), you can upgrade to SID instead. SID stands for "Still In Development" and consists of the newest packages in Debian. This is the "Unstable" branch. Here, we have php4 4.3.4

Pro: Newest packages possible. This includes security fixes
Con: Newest packages are often untested and can break, sometimes seriously.

Still want to upgrade? Edit /etc/apt/sources list and replace your deb line with
deb http://http.us.debian.org/debian xxxxx main contrib non-free
where xxxxx is stable testing or unstable. (and .us. is your country code, in case you don't live here.) apt-get update; apt-get dist-upgrade

Don't want to upgrade? You have two choices. 1) Search http://www.apt-get.org for a "backport" of the php4 package you want and follow their instructions for installing it. 2) Backport the package you want yourself. The easy way is to follow these steps:
1)Choose which stage you want to backport from (probably unstable) and create the line in /etc/apt/sources.list (comment out any existing deb-src lines).
deb-src http://http.us.debian.org/debian xxxxxxx main contrib non-free
2) Install all compilation tools you'll need (the meta-package "build-essential" will automatically install these)
3) run apt-get source --compile php4 This will download and attempt to compile php4 into packages. If it says you need yyyyy:
a) try apt-get install yyyyy. If it works and you can get the right version for the php package, try compiling php4 again.
b) if it doesn't work, apt-get source --compile yyyyy.
---- Repeat the above steps until you can get everything you need compiled and installed (the --compile step will create .deb files you install using dpkg -i filename.deb)

The hard way (which is what is used to get on apt-get.org) is to pick apart the configuration for the newer package to see what will and wont work on the stable system. Disable features where the libraries are not available, change the configuration to require lower version numbers, etc.

In your case, apt-get.org lists several php4 backported packages. This is the way I suggest you go.
 
Old 03-06-2004, 12:23 PM   #3
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
Qzukk,

That's a wonderfully-written reply. You should consider writing some stuff for the Debian WIKI here at LQ.

Good job,

Ken
 
Old 03-06-2004, 12:32 PM   #4
waffe
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 69

Original Poster
Rep: Reputation: 15
Thanks Qzukk,

So when I see the word (woody) next to Debian it means it is the stable version of debian. Got it.

I don't think this is where my web server problem lies. Since this is the latest stable version of php I doubt upgrading will solve my php problem.

Thanks.
 
Old 03-06-2004, 02:58 PM   #5
Qzukk
Member
 
Registered: Jun 2003
Posts: 132

Rep: Reputation: 15
Well, its not the latest stable version of php. Being in Debian Woody just means that it was the stable and tested version that was available at the time.
 
Old 03-06-2004, 05:17 PM   #6
waffe
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 69

Original Poster
Rep: Reputation: 15
Ya I think I will check it out!

What do you mean when you said:
deb http://http.us.debian.org/debian xxxxx main contrib non-free

I put sarge in place of the xxxxx but this not work.

What goes in its place?
 
Old 06-09-2004, 03:19 PM   #7
bvdb
LQ Newbie
 
Registered: Jun 2004
Posts: 3

Rep: Reputation: 0
Hello,

Quote:
Originally posted by Qzukk
... The "Stable" (aka Woody) means that every package you have access to has undergone significant testing ...

Pro: You can automate upgrades and get the latest security fixes without worrying that something will break.
Con: It will take months from now before php 4.3.x will appear in Stable, if it does at all (enough changes have been made that might break existing .php code... you see where this is going, right?)

..."Unstable" branch. Here, we have php4 4.3.4

Pro: Newest packages possible. This includes security fixes
Con: Newest packages are often untested and can break, sometimes seriously.
...
This position is biased towards the distro position of the game - of course the distro people are quick to declare "stable" what they have thorougly tested - month ago.

Declaring everything else as "unstable" is simply shifting the responsibility over to the (server) users. - Their view is different: In the meantime several vulnerabilities will have been discovered, published (and read by users as well as malicious hackers...) and fixed.
So the user is best advised to stick to new versions of his heavily-used apps (like apache, PHP, Perl, SSL etc.). A good distro will carefully balance the good sleep of the distro developers with the good sleep of the server users.

Not like debian, as it appears to me now:
PHP 4.3.7 is three steps (therein two "major bugfixes") ahead of the latest debian-"testing" version 4.3.4 ...

// Bernd vdB, Berlin
 
Old 06-09-2004, 03:22 PM   #8
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
Debian package maintainers regularly backport patches into the Stable tree. This is why Stable (currently Woody) users are encouraged to include the "security" apt-line in sources.list.
 
Old 06-09-2004, 03:38 PM   #9
bvdb
LQ Newbie
 
Registered: Jun 2004
Posts: 3

Rep: Reputation: 0
Still no php 4.3.7

Hi,
http://www.apt-get.org/ gives me this when Isearch for "php" in "i386":

Warning: Supplied argument is not a valid PostgreSQL link resource in /md0/sites/apt-get.org/htdocs/lib.php


And in http://www.backports.org/ I did not find any php4.

// Bernd
 
Old 06-09-2004, 03:41 PM   #10
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
apt-get.org is broken atm. You can also download the source for php directly and build a deb. I gave up with Stable and pushed my servers to Testing. Works fine. A few programs (gallery, mailman) nutted up during the transition but I found answers here or on Google.
 
Old 06-09-2004, 04:37 PM   #11
bvdb
LQ Newbie
 
Registered: Jun 2004
Posts: 3

Rep: Reputation: 0
Quote:
Originally posted by llamakc
... You can also download the source for php directly and build a deb. I gave up with Stable and pushed my servers to Testing.
Yes, of course I can install from sources, but then I could have used the time for learning the apt system better (like sailing?).

And, did I forget to mention, TESTING is already running here.

Last edited by bvdb; 06-09-2004 at 05:26 PM.
 
Old 06-09-2004, 05:17 PM   #12
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
Use apt-pinning. Install php4 out of experimental. Use google.com and find this:

http://bugs.dotdeb.org/main_page.php

Instructions on that site.

Debian can be very flexible too.

Good luck!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Newer version of tar? imahdi Linux - Software 1 01-04-2005 08:26 PM
installing newer version of programs ziggie216 Linux - Software 2 04-14-2004 03:34 PM
question of installing php pear by apt Joe_Zhu Linux - Software 1 04-02-2004 01:04 AM
Xfree Error (EE) module ABI minor version (7) is newer than the server's version (6) jimdaworm Slackware 0 10-17-2003 05:26 PM
Xfree prob radeon.o kernel module version is 1.1.1 but version 1.5.0 or newer needed. jimdaworm Slackware 0 10-01-2003 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration