Click to See Complete Forum and Search --> : .php not being interpreted as PHP


laboofar
03-23-2004, 12:56 PM
As much as I want to like Linux, I can't say that mysql/php installation is anywhere nearly as easy as it was on Windows.

After 2 successful Windows install, I am now stumped trying to get php working on Slackware 9.

Basically my <?php phpinfo() ?> file is being displayed as text in my browser. As far as I can tell, my Apache 2 server is running since it serves back the default page when I browse "localhost". (It didn't at first until I copied the htdocs folder into /var/www ?? Even though my httpd.conf file says the Document Root is /usr/local/apache2/htdocs -- Never found that one in the documentation!)

my httpd.conf includes lines like:

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

and later, following something I saw in another thread:

AddModule /pathtomodule/mod_php4.c

I used the option --enable-so when I installed apache as well.

-- Any suggestions?

linusaurus
03-23-2004, 03:57 PM
Are you using apache 1.3 or apache 2.0?
What version of PHP are you using?

Here's something to try for apache2, there's a file
/etc/conf.d/apache2 (location may differ on slack)

at the end of the file there should be a line:
APACHE2_OPTS="-D SSL"

change that line to:
APACHE2_OPTS="-D PHP4"

and things should work. At least thats what I did on Gentoo to get it to work, now if I can only figure out redhat.