CGarson

Well-Known Member
Jul 29, 2002
74
0
156
For some reason, PHP does not work in Apache. Any time I wasnt to run a PHP file, it just brings up the download dialog.
 

MrHits

Well-Known Member
Oct 31, 2001
92
0
306
do you have these lines in your apache conf at:
/usr/local/apache/httpd.conf

#support for php3

AddType application/x-httpd-php .php3

#AddType application/x-httpd-php3-source .phps

# And for PHP 4.x, use:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
 

MrHits

Well-Known Member
Oct 31, 2001
92
0
306
Have you tired running the script from a command line to look at its output?


What is the script doing?


try running this:

&?

print &Hello World&;

?&

name the file

testing.php


Another thing I woudl check is your .htaccess file in the directory serving the page, make sure nobody has modified it to change the mime types.
 

MrHits

Well-Known Member
Oct 31, 2001
92
0
306
preoblem was:

httpd.conf was missing the so's for php:

LoadModule php4_module libexec/libphp4.so

and in the moudle list:

AddModule mod_php4.c


resolution was to rebuild apache using buildapache.