configuring php with apache

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cubanallstar
Forum Newbie
Posts: 4
Joined: Wed Sep 03, 2003 5:31 am
Location: Madchester, UK

configuring php with apache

Post 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
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

http://www.lug.unt.edu/php/

That might help...

-Nay
cubanallstar
Forum Newbie
Posts: 4
Joined: Wed Sep 03, 2003 5:31 am
Location: Madchester, UK

Post 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


??
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post 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?
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post 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
cubanallstar
Forum Newbie
Posts: 4
Joined: Wed Sep 03, 2003 5:31 am
Location: Madchester, UK

Post 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?
Post Reply