|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
can't get php to work with apache
I am running RedHat Linux 7.2 with PHP/4.0.6
from the shell I can use php fine. but when browsing to a php file I get a blank screen. Does anyone have any ideas?? attached is my httpd.conf file Thank you...for any help I can get |
|
#2
|
|||
|
|||
|
Did you add this (below) in your httpd.conf?
AddType application/x-httpd-php .php .php3 .php4 .phtml |
|
#3
|
|||
|
|||
|
Is this what your talking about?
here is a snip from my /etc/httpd/conf/httpd.conf file : # AddType allows you to tweak mime.types without actually editing it, or to # make certain files to be certain types. # # For example, the PHP 3.x module (not part of the Apache distribution - see # http://www.php.net) will typically use: # <IfModule mod_php3.c> AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .phps </IfModule> # # And for PHP 4.x, use: # <IfModule mod_php4.c> AddType application/x-httpd-php .php .php4 .php3 .phtml AddType application/x-httpd-php-source .phps </IfModule> # # For PHP/FI (PHP2), use: # <IfModule mod_php.c> AddType application/x-httpd-php .phtml </IfModule> |
|
#4
|
|||
|
|||
|
If php3 + php4 coexists, don't put .php3 to:
AddType application/x-httpd-php .php .php4 .php3 .phtml .... The IfModule directive is the worst directive ever used in Apache. It assumes everything to be true at all time. However, it's a safe way to make sure Apache startup properly when certain module is malfunctioning. That said, to make sure mod_php4 really compiled to Apache statically or dynamically, remove or uncomment the <IfModule> and </IfModule> line. Upon startup, you can tell whether or not mod_php4 is complied properly. |
|
#5
|
|||
|
|||
|
I had to add the follow lines :
Action application/x-httpd-php3 /usr/bin/php Action application/x-httpd-php /usr/bin/php as well as taking your advice and it's working great. thank you again... |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > can't get php to work with apache |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|