-1

Around 2 years ago I attempted my first PHP compile and succedded. I occasionaly upgrade my compile script as I add modules and new versions come out.

However, I'm finding that apt-get unattended upgrades keep overwriting my PHP installation periodically. The last happened last night and downgraded my installation from 5.5.1 to 5.3.10

It happens very infrequently, but still brings the server down before I realise what has happened.

I ran dpkg -l and can see even when I have my 5.5.1 setup, the dpkg version still reads 5.3.10. I presume this is because I have done my own compile of php5. Should I:

  1. Uninstall PHP from apt-get and block it's install in future
  2. Install my custom compiled version differently so dpkg recognises it?
  3. Just go ahead and block dpkg from allowing php updates.
  4. As yet undetermined 4th options?

Your help is appreciated.

1

Install my custom compiled version differently so dpkg recognises it?

The most sane solution is that you build your own deb packages and install it using apt/dpkg. This is easy since you only have to take the Ubuntu sources, replace the orig.tar.gz file with your own, check the patches that Ubuntu apply and presto. The only downside is that you can uninstall it later at will (?) and some quirks that you may find while you figure out how to do stuff. IMO, this is the most recommended.

(You can also set up a build server to build PHP each time you update it)

Uninstall PHP from apt-get and block it's install in future

If you use this, apt doesn't know that you have php installed and whenever you try to install stuff that depends on PHP... well...

Just go ahead and block dpkg from allowing php updates.

This is not sane. You have two php's installed and God knows what bugs or security holes could be open. The best is that your production environment is stable with all it's patches and stuff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.