Re: Configuring PHP4 for Apache

2004-08-27 Thread Stephen Tait
At 19:40 27/08/2004, you wrote:
Hi,
I thought I had this configured correctly, because it was working at
one time (like yesterday).  I have installed PHP4 with the lastest
Apache.  What happens when I try to load for example the "phpinfo()" —
which I have named "view.php" it will read it in as a file and bring
up the download prompt.  Can somebody point me in the right direction
here?
It looks like Apache isn't handling the MIME type/file extension thing 
properly.

Check that your mime types have PHP listed:
pizpot:/home/pika# cat /etc/apache/mime.types | grep php
application/x-httpd-php phtml pht php
application/x-httpd-php-source  phps
application/x-httpd-php3php3
application/x-httpd-php3-preprocessed   php3p
application/x-httpd-php4php4
IIRC I also had to add index.php to the Directory Index list in httpd.conf
DirectoryIndex index.html index.htm index.php index.shtml index.cgi 



Configuring PHP4 for Apache

2004-08-27 Thread Nigel J. Wood
Hi, 
 
I thought I had this configured correctly, because it was working at
one time (like yesterday).  I have installed PHP4 with the lastest
Apache.  What happens when I try to load for example the "phpinfo()" â
which I have named "view.php" it will read it in as a file and bring
up the download prompt.  Can somebody point me in the right direction
here?  Here are a few bits and pieces of my 'http.conf' file:
 

#LoadModule cgi_module /usr/lib/apache/1.3/mod_cgi.so
 

 LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
 
 
...
 
DirectoryIndex index.htm index.html index.shtml index.php index.php3 index.php4
 
..
 
#ScriptAlias /php4/ /usr/lib/php4/
#ScriptAlias /php4/"/usr/lib/php4/
 
.
 
I feel this is where I must have messed up
 
 #AddType application/x-httpd-php3 .php3
#AddType application/x-httpd-php3-source .phps
#
# And for PHP 4.x, use:
 

AddType application/x-httpd-php .phtml .php3 .php
AddType application/x-httpd-php-source .phps


 
Thanks for your help in advance, 
 
njwood