Hi David,
In my httpd.conf, I have:
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .phtml
DirectoryIndex index.html index.wml index.cgi index.shtml index.jsp
index.js index.jp index.php4 index.php3 index.php index.phtml
index.htm default.htm default.html home.htm
The DirectoryIndex lines above should all be one line.
These are all the lines in my httpd.conf that have the letters 'php'
in them. Try adding them in the appropriate areas.
Specifically, your problem is a MIME type identification problem. By
default, if the server doesn't know what the 'type' is for the file it
is serving, it'll send a generic MIME type to the browser (IIRC, it'll
send it as "application/octet-stream"), which then ends up starting a
download.
So, the AddType takes care of the MIME type issue. Of course, it first
needs to know about the PHP module, so that's what the lines above the
AddTypes take care of.
By the way, you might need to learn about compiling your Apache with
PHP. I've never done it, but I believe there are two ways Apache can
handle PHP files: one is where it's compiled in and it is less of a
server load to do this, the other is to 'call' it externally. I'd
suggest visiting the PHP site[1] and learning about installing PHP
with Apache so you can make a conscious decision about how you want it
on your server.
Good luck!
[1]
http://www.php.net/
--
Ric Fischer
On Fri, 7 Jan 2005 15:47:43 -0700, David Demland <
demland@cox.net> wrote:
> I removed PHP 3 and PHPGroupware. I installed PHP4 from the Debian package,
> then I was going to go the install one of the groupware software. After
> installing PHP 4 I still can not call up a PHP file from the browser. All
> the browser does is prompt to save the file. The PHP file looks like:
>
> <html>
> <head>
> <title>PHP Test</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1">
> </head>
> <body>
> <h1>PHP Test</h1>
> <p>
> <b>An Example of PHP in Action</b><br />
> <?php echo "The Current Date and Time is: <br>";
> echo date("g:i A l, F j Y.");?>
> </p>
>
> <h2>PHP Information</h2>
> <p>
> <?php phpinfo(); ?>
> </p>
> </body>
> </html>
>
> When I had PHP 3 installed, if this file had a .php3 extension it would run,
> but it would only download if there was a .php extension. Now that I have
> PHP 4 installed all that happens is the prompt for the download no matter
> what the extension is. I am lost, any ideas?
>
> David
>
> -----Original Message-----
> From: plug-discuss-admin@lists.plug.phoenix.az.us
> [mailto:plug-discuss-admin@lists.plug.phoenix.az.us]On Behalf Of Ric
> Fischer
> Sent: Friday, January 07, 2005 1:11 PM
> To: plug-discuss@lists.plug.phoenix.az.us
> Subject: Re: Apache, PHP, and PHPGroupware
>
> Hi David,
>
> On Fri, 7 Jan 2005 11:45:53 -0700, David Demland <demland@cox.net> wrote:
> > The reason for the PHP 4 being commented out is that PHPGroupware installs
> > PHP 3 and PHP 4 does not coexist with PHP 3. If I try to install PHP 4,
> them
> > PHP 3 and PHPGroupware are both removed. When I try to install
> PHPGroupware
> > after installing PHP 4, then PHP 4 is removed and PHP 3 is installed.
>
> I'm confused. phpgroupware is an active project. I see no reason why
> they would require PHP 3. In fact, I doubt their regular install
> routine even includes a distribution of PHP. Have you tried
> downloading the latest version at their site[1]?
>
> Are you using a special install that includes PHP for you?
>
> I'd go with the latest stable from their own site. Uninstall PHP 3,
> PHP 4, and the phpgroupware. Install PHP 4. Then install phpgroupware
> that's available on their site.
>
> By the way, for this genre of software, I prefer eGroupWare[2]. It
> feels more mature and seems to have a lot more development and user
> activity.
>
> [1] http://phpgroupware.org/
>
> [2] http://egroupware.org/
>
> --
> Ric Fischer
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss