Click to See Complete Forum and Search --> : PHP support in Apache from fresh RH8 install


Cerf
07-10-2003, 03:01 PM
Yo yo yo,

About 3 weeks ago I installed the RH8.0 computer that I am using now. I got apache to work, yeah. Now I need to get php support into apache. I tried looking into a tutorial but their assumption what that php was not already installed so I just got confuzed.

Is there just a generic /etc/httpd/conf/httpd.conf file I can use for the configuration of apachy with PHP??

mdwatts
07-10-2003, 03:16 PM
Have you first tried Redhat's own online documentation as I do know they have a section on Apache and likely PHP.

Their Apache docs should tell you about httpd.conf.

mdwatts
07-10-2003, 03:17 PM
http://www.redhat.com/support/resources/howto/rhl80.html

Cerf
07-11-2003, 01:22 PM
OK I went there and did alittle searching, and I found http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/prog/c7773.html.

I read through the page, so I knew what I was getting into. When It came time to edit the /ect/httpd/conf/httpd.conf file, the tutorial told me to...


Make sure that these lines are uncommented in httpd.conf:

LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php


The lines it says to uncomment were never there in the first place, so I added them. After which I tried restarted the server, but the server did not restart. There was an error somewhere.

httpd failed. The error was: Stopping httpd: [OK]
Starting httpd:
Apache 1.3 configuration directives found
please read /usr/share/doc.httpd-2.0.40/migration.html
[FAILED]


I checked to make sure I have php installed so I did a...

[root@localhost root]# rpm -aq *php*
php-pgsql-4.2.2-8.0.8
php-dbg-client-2.10-6
php-manual-4.2.2-8.0.8
php-mysql-4.2.2-8.0.8
asp2php-0.76.2-3
php-dbg-server-2.10pl3-6
asp2php-gtk-0.76.2-3
php-dbg-base-2.10-4
php-devel-4.2.2-8.0.8
php-imap-4.2.2-8.0.8
php-odbc-4.2.2-8.0.8
php-4.2.2-8.0.8
php-ldap-4.2.2-8.0.8
php-snmp-4.2.2-8.0.8


At this point I dont know what I did wrong

Cerf
07-11-2003, 02:06 PM
I got it now

All I had to do was to add the lines


AddType application/x-httpd-php .php
LoadModule php4_module libexec/libphp4.so


To the /etc/httpd/conf/httpd.conf file

mdwatts
07-11-2003, 02:26 PM
Good job Cerf.

You are now known as our resident Apache/PHP expert. :D

Cerf
07-11-2003, 07:34 PM
lol