Page 1 of 1

configuring php with apache

Posted: Wed Sep 03, 2003 5:31 am
by cubanallstar


hi guys ive run into some problems getting php to work on apache. Running redhat 7.2 OS and have started up apache and downloaded php 4.3.3 off php.net successfully. Ive also extracted the php download although im not too sure if this was successful as I got no message status, presume it went ok tho?! Im completly new to linux and have only been using it for about a week now, so still trying to find my feet. I really dont know what to do here so need you all to share the wealth!

regards

cubanallstar

Posted: Wed Sep 03, 2003 5:50 am
by Nay
http://www.lug.unt.edu/php/

That might help...

-Nay

Posted: Wed Sep 03, 2003 6:05 am
by cubanallstar
With reference to the following heading in the above linked tutorial:

Making the Web Server Understand PHP Files

The files that were suggested did not exist Really quite unsure to whether I actually downloaded the php source properly. I mean the only other alternative that seems straight4ward at the mo would be to uninstall apache and to install a whole package containing apache and php, similar to the one suggested in the above link


??

Posted: Wed Sep 03, 2003 6:23 am
by JAM
Redhat 7.2

Install the apache-devel RPM.
./configure --with-apxs=/usr/sbin/apxs
make && make install

httpd.conf should have the following:
LoadModule php4_module modules_folder/libphp4.so
AddModule mod_php4.c
<IfModule mod_php4.c>
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps
</IfModule>

/etc/rc.d/init.d/httpd restart
Isn't that enough?

Posted: Wed Sep 03, 2003 7:30 am
by Nay
i'm sure there were notes in the php.ini and so on. i THINK there is a read me file somewhere there (there should be though).

i've only used PHP on IIS, no experiance with Apache......even worse, i have never even touched a Redhat Linux machine before......

-Nay

Posted: Wed Sep 03, 2003 8:01 am
by cubanallstar
pardon if I sound lost but how do i go abouts installing the apache -devel RPM ?? How do I know when I have it Myt I have it already? Also the second paragraph doesnt look familiar

At shell promt do I type in ./config --with -apsx = /usr/sbin/apsx or just start /usr/sbin/apsx?