PHP4 & Apache
Could someone please explain, in idiot-level detail, how to get a .php
file to display correctly in Netscape.
I apt-get installed PHP4 (which included Apache) a few days ago. I've
started Apache okay with:
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php.source .phps
in /etc/apache/httpd.conf, and:
#AddType application/x-httpd-php3 .phtml
#AddType application/x-httpd-php3-source .phps
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
in /etc/apache/srm.conf. I also have:
application/x-httpd-php phtml pht php
application/x-httpd-php3 php3
application/x-httpd-php3-source phps
application/x-httpd-php3-preprocessed php3p
in /etc/mime.types.
I have this simple script called /home/steve/hello.php:
<html><head><title>PHP Test</title></head>
<body>
<?php echo "Hello World<P>"; ?>
</body></html>
When I open it in Netscape, it wants to save it as a .php file. I've
tried running it from /var/www and I get the same result. I've tried
setting Netscape to use php for types of application/x-httpd-php but it
just says it can't find php.
Do I need to start PHP as a daemon or something? What am I missing - this
is really starting to annoy me now. Do I need to alter Apache's
configuration somehow? Please help!
Steve.
Reply to: