1

PHP4 was removed from lenny package lists. Any suggestions what might be the best approach to install php4 (Apache mod and cli) on a lenny box without breaking php5? And possibly still having the ability to uninstall later on.

2 Answers 2

2

It should be possible to install php4 along side php5; they were available before and the packaging was designed to have php4 or php5 in the paths that they used. The easiest thing to do would be to download the source packages for php4 from sarge, extract them using:

# dpkg-source -x php4.dsc

cd into the newly created directory, then build it using:

# debuild -us -uc -b

This should then create the packages you need in the parent directory. I've missed out the version numbers in the .dsc file name.

4
  • Could you tell me how can I obtain the source packages from sarge? By adding some repository to sources.list or by manual download? Can't seem to find it.
    – Karolis T.
    Jun 12, 2009 at 7:42
  • Apologies, I meant Etch. You can find the source on the right hand side of packages.debian.org/etch/php4. You'll want all three files. Jun 12, 2009 at 9:23
  • Thanks, I have it now and am battling with the dependencies.
    – Karolis T.
    Jun 12, 2009 at 10:19
  • That might be why it was removed :) Most of the time you can probably just up any version numbers in debian/control to match what is in Lenny. In some cases, you may need to do the same procedure with a dependency. Jun 12, 2009 at 10:28
0

Hmmm an apt-cache search php4 on my Debian/Squeeze workstation lists tons of php4 packages, are you sure it has been removed?

I'd say there are 2 Options:

Option1:

Forward port php4, you need to apt-get source the package in question, and simply rebuild it on a lenny box. I won't go into details as different dependencies might need quite some amount of time to figure out (especially if you never forward ported packages before)

Option2:

Not exactly the least interrupting solution but I think that OpenVZ is the perfect match for this.

OpenVZ is a container based virtualization, thus it doesn't really add any overhead. Overhead is slightly more than using a chroot environment, but a lot less than XEN or kvm.

We use it as a service seperation for nearly everything, the largest overhead it adds is some waste of disk storage which in these days isn't much of a problem.

You'd simply install OpenVZ (this needs a reboot) and debootstrap an etch instance right on the host, boot it add an IP and work just like with a normal box.

5
  • you could just use a chroot. Jun 12, 2009 at 7:43
  • true but I found chroot to be a lot more cumbersome than openvz (once it's set up). Jun 12, 2009 at 7:44
  • Thanks for your answer, I don't want to go OpenVZ route just yet, will have it in mind though. Here's my sources.list: <pre> deb http.us.debian.org/debian stable main contrib non-free deb non-us.debian.org/debian-non-US stable/non-US main contrib non-free deb security.debian.org stable/updates main contrib non-free deb-src http.us.debian.org/debian stable main contrib non-free deb-src non-us.debian.org/debian-non-US stable/non-US main contrib non-free </pre> apt-cache/aptitude doesn't return anything php4 related.
    – Karolis T.
    Jun 12, 2009 at 7:45
  • Uh, sorry, thought <pre> tags worked same way in comments.
    – Karolis T.
    Jun 12, 2009 at 7:46
  • It's possible that it's in squeeze because it was intentionally kept out of the stable release due to critical bugs. Having said that, I don't think I saw them this morning when I looked on packages.debian.org. Jun 12, 2009 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .