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'm trying to get php and apache playing nice together on RedHat 5. I don't have root access. So far I've got a custom install of apache2 in a non standard location and I've run:

yum install php

This has installed PHP but I need available to get apache talking to php.

Any suggestions about how I can do this without running make install would be greatly appreciated...

share|improve this question
May I ask how you managed to run "yum install php" without root privileges? If that really has run to completion, it should have installed libphp for you. – MadHatter Oct 28 '10 at 13:10
The sysadmin did this for me, however locate turns up nothing... – Nomadin Oct 28 '10 at 13:47
Could you do an "rpm -ql php" and post the output? My CentOS 5 (=RHEL5) php package includes the library: [madhatta@www ~]$ rpm -ql php /etc/httpd/conf.d/php.conf /usr/lib/httpd/modules/ /usr/lib/httpd/modules/ /var/lib/php/session /var/www/icons/php.gif [madhatta@www ~]$ (sorry about the formatting) – MadHatter Oct 28 '10 at 13:56
I managed to rebuild PHP to a non-root directory using --prefix=.... Having even more trouble getting Apache to handle PHP at all but that's a separate problem...! Thanks for your help. – Nomadin Oct 28 '10 at 15:21
I'm glad you've got it working, but I think you're in for a world of pain using a handbuilt PHP. I strongly suspect you have it installed as part of the php rpm; I would recommend that you use that one unless there's a very good reason not to. – MadHatter Oct 28 '10 at 15:27
up vote 0 down vote accepted

Autotools makefiles have a DESTDIR variable to install in a different location.

make install DESTDIR=/path/to/where/you/want/php

should install it where you want.

share|improve this answer
Thanks, between this and using --prefix=... I got there. – Nomadin Oct 28 '10 at 15:21

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.