Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to uptake fix for this PHP Bug:

I am not sure on how can I install this patch. Conceptually I understand I need to follow following steps:

  • get php code & GD module code
  • apply code fix or patch to code
  • compile
  • reinstall using compiled files

But I have never done these steps before, so I am not sure about commands for any of the above steps.

Can someone elaborate on this process. I am using Ubuntu 12.04 32-bit, and this bug is blocking me from using GD module with php.

Also is there a tool or script to do the complete patching process in an automated way?

share|improve this question

you have to copy/paste the patch code from in simple text file lets say php.patch then unpack php tarball and in the same directory issue the command above. Notice that that patch works well only for php version 5.3 with any other php version you can meet some problems

This is the command you have to use .

patch -p1 < /path/to/patch/file

credit goes

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

This is not a sufficient explanation. This merely explains how to apply a patch and does nothing on how to get PHP's source, how to apply the patch in this case, or how to rebuild and repackage PHP - all of which would be required to do this properly. – Oli Dec 22 '12 at 2:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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