Server Fault is a question and answer site for system and network administrators. 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 upgrade Apache, I'm a few versions behind (Apache/2.2.12) and I want to add mod_ssl. Do I need to recompile PHP? I also use the APC PHP extension - if I need to recompile PHP, will I need to recompile APC?


share|improve this question
What platform? Why don't you use Apache, PHP and php-apc from repository? – mkudlacek Jul 22 '10 at 9:58
CentOS release 5.3 (Final) Linux 2.6.18-194.8.1.el5PAE #1 SMP i686 i686 i386 GNU/Linux – Tom Jul 22 '10 at 10:11
up vote 1 down vote accepted

Safest answer: if you recompile Apache you should recompile PHP (and APC.)

Longer answer: you might be able to get away with not recompiling PHP (or APC) if nothing that mod_php depends on changed between Apache versions. mod_php should only be using the public Apache API and that doesn't tend to change between minor releases (from 2.2.12 to 2.2.13 for example.)

In all honesty, it's likely more important to keep PHP up to date given the various security fixes present in each release. So, if you're upgrading Apache consider it a good time to upgrade PHP (and APC) to the latest stable releases.

share|improve this answer

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.