[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache and PHP

On Tue, 2003-04-08 at 14:18, nate wrote:
> Anthony Irwin said:
> > Hi,
> >
> > I know this is an easy question but I haven't been able to get this basic
> > setup to work, I can do it under redhat but the config files and packages
> > are different under Debian.
> >
> > If anyone can point me to a good Debian specific tutorial or give me some
> > quick tips then I would be greatful.
> >
> > Using 'apt-get install' I have installed php4, php4-cgi, apache and mysql.
> > I have uncommented the mime handler for php4 in the /etc/apache/httpd.conf
> > file, but when I try to run a php script in a web browser it asks me where
> > I want to save the file.
> >
> > I am trying to get this to work on both woody and unstable systems any
> > suggestions would be great.
> sounds like the mime type isn't set:
> AddType application/x-httpd-php .php

Are these .php files or .php3?

On my "testing" systems any .php3's cause problems because the default
/etc/mime.types file has;

application/x-httpd-php3                       php3

With php4 installed, apache doesn't know how to handle these and falls
back to download. The fix is to edit /etc/mime.types and make the
following changes;

< application/x-httpd-php                         phtml pht php
> application/x-httpd-php                         phtml pht php php3
< application/x-httpd-php3                       php3
> #application/x-httpd-php3                       php3

Note you will need to restart apache for the changes to take affect.

Donovan Baarda                http://minkirri.apana.org.au/~abo/

Reply to: