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:
- Get your desired distribution. I've tried the latest (5.5.1) and what is in the CentOS repository (5.3.3)
- Get prerequsits – most reference libxml2-devel, some httpd-devel and gcc.
- ./configure –with content specific to your build (varies)
- make && make install
- place php.ini from source folder into /etc/
- 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.
Best Answer
It's very bad practice to install from source. All you need is to install IUS Community Repo
excerpt
You can add the repo as follows to
yum
:And then install necessary packages