LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing PHP from source on RedHat 9 with Apache -- few questions? (https://www.linuxquestions.org/questions/linux-software-2/installing-php-from-source-on-redhat-9-with-apache-few-questions-63860/)

Bungo2000 06-05-2003 01:50 PM

Installing PHP from source on RedHat 9 with Apache -- few questions?
 
I'm trying to install PHP 4.3.2 from source on a RedHat 9.1 web/mail server running Apache 2.0.46 (also compiled from source).

I'm a bit confused as to what options I should use with ./configure for PHP.

With Apache I used the RedHat layout, but PHP doesnt seem to have one, though it does have a GNU layout option. I want PHP to be a module for Apache. In fact, I only want to use PHP for squirrelmail! I'm just very confused as to where stuff should be installed to. Redhat RPMs install with a very specific scheme, but I guess it doesnt actually really matter where I put stuff.

Do I need to specifcy the location of my Apache files, or will it automatically find them, or does it not even need them. If it doesn't need them, how will I get PHP working with Apache?

Also, if I just install a RedHat PHP RPM, will this cause a problem because my Apache was installed from source? Can RPMs automatically find correct flie paths?

Also, what's the deal with 'uninstalling' things compiled from source? My Apache source didnt have an uninstall option, and from what I can see, this PHP one wont have one either. Shouldn't I simply be able to 'make uninstall' ? If not, whats the best way to uninstall something installed from source?

Sorry for being so vague, just some clarifications would be really nice

Thanks a lot!

twood 06-05-2003 03:41 PM

Regarding compiling php to work with apache, you'll want to run the php ./configure like so:
./configure --with-apxs=/usr/local/apache/bin/apxs (or wherever apxs is). The apxs script will compile php as a loadable module for use with apache.

After that just add this line (if it wasn't automatically added)
to your httpd.conf:

LoadModule php4_module libexec/libphp4.so

Then, add

application/x-httpd-php php

to your mime.types file and reload apache.


All times are GMT -5. The time now is 02:01 PM.