Skip to main content
3 of 3
Show appreciation through votes. Thanks not necessary on SO/SX http://meta.stackoverflow.com/a/3021/186664
Anthon
  • 81.4k
  • 42
  • 174
  • 228

Difficulty installing PHP from source to CentOS 6.4

The problem:

After installing PHP from source, functionality is not present - my phpinfo test page does not work. If I use yum to install from the repository functionality is restored.

Why am I doing this:

Ultimately I want to add ImageMagick/MagickWand funcationality. Appearently MagickWand needs to be compiled with PHP and sources I've found stating otherwise have been unsuccessful for me.

What I've tried:

About every resource I've found is fairly straight-forward but nothing really addresses what to do if this process fails:

  1. Get your desired distribution. I've tried the latest (5.5.1) and what is in the CentOS repository (5.3.3)
  2. Get prerequsits - most reference libxml2-devel, some httpd-devel and gcc.
  3. ./configure --with content specific to your build (varies)
  4. make && make install
  5. place php.ini from source folder into /etc/
  6. restart httpd.

A couple examples of documents I've observed for this process:

http://benramsey.com/blog/2012/03/build-php-54-on-centos-62/ http://www.thegeekstuff.com/2008/07/instruction-guide-to-install-php5-from-source-on-linux/

Im not sure what I'm doing wrong but honestly I don't work from source very often. I feel that I am missing an unwritten constant. Any advice? I'll be able to provide any additional information as needed.