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

Re: browser tries to download php test file info.php

On Sun, Mar 17, 2002 at 10:06:24AM -0800, Xeno Campanoli wrote:
> ktb wrote:
> > 
> > On Sat, Mar 16, 2002 at 10:05:09PM -0800, Xeno Campanoli wrote:
> > > Say, I'm stuck making PHP go.  As per instructions on page 43 of
> > > Converse and Park, I made an info.php file, but when I specify it's URI,
> > > the browser just tries to download it.  I've got the Addtype(s) in
> > > Apache, and I've got valid /etc/php4/*/php.ini files (the * gives
> > > "apache" and "cgi" directories), and I've protected /var/www as per the
> > > instructions.  So what gives?  Is this a simple omission, or am I
> > > broken?  Is this obvious?

I am playing with it too in woody.

I needed to install php4 module by "apt-get install php4" as you might
have already done.

Also, /etc/apache/httpd.conf I needed few things.
1. comment out to enable php4 module

LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

2. My php page have extention .php   In order index.php to be auto
started like index.html, I editted as:

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
<IfModule mod_dir.c>
    DirectoryIndex index.html index.htm index.shtml index.cgi index.php

3.  If any files with .html needs to be php, I could enable it by:

    # And for PHP 4.x, use:
    AddType application/x-httpd-php .php .html

I do not know this last config is right thing to do or not.  
It works, though :)

~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
Osamu Aoki <debian@aokiconsulting.com>, GnuPG-key: 1024D/D5DE453D
Visit Debian reference http://www.debian.org/doc/manuals/quick-reference/
There are 6 files: index.{en|fr|it}.html quick-reference.{en|fr|it}.txt
I welcome your constructive criticisms and corrections.

Reply to: