Click to See Complete Forum and Search --> : PHP still doesn't work with Apache help!


Cdee007
01-26-2001, 01:55 AM
Hey guys,

Apache works, php compiles and looks like it's working but when I test my php scripts my browser wants me to download my php file instead of running the script. What the heck is going on. I've installed and reinstalled many times....I think I'm not building a new httpd file because when I do a
httpd -l I don't see
mod_php.c listed. and I've changed the httpd.conf adding the
AddType application/x-httpd-php .php
still nothing works...help please!!!

Clayboy
01-26-2001, 03:57 AM
Here are the relevant php parts from my httpd.conf file on my redhat 7 box. Hope it helps any. Let me know if you want me to post the whole httpd.conf .

<IfDefine HAVE_PHP>
LoadModule php_module modules/mod_php.so
</IfDefine>
<IfDefine HAVE_PHP3>
LoadModule php3_module modules/libphp3.so
</IfDefine>
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so

<IfDefine HAVE_PHP>
AddModule mod_php.c
</IfDefine>
<IfDefine HAVE_PHP3>
AddModule mod_php3.c
</IfDefine>
<IfDefine HAVE_PHP4>
AddModule mod_php4.c

<IfModule mod_php4.c>
AddType application/x-httpd-php .php4 .php3 .phtml .php .html
AddType application/x-httpd-php-source .phps
</IfModule>

# The following is for PHP3:
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3 .html
AddType application/x-httpd-php3-source .phps
</IfModule>

# The following is for PHP/FI (PHP2):
<IfModule mod_php.c>
AddType application/x-httpd-php .phtml
</IfModule>