Discussion:
[PHP-INSTALL] PHP files coming up as files to download? (Part 2)
Frank DeChellis
2008-12-24 18:36:39 UTC
Permalink
Hi there,

I am new to this list.

I have Apache 1.3.41, PHP 5.2.8 running on NetBSD 4.0.1. This install is
new. I have Apache and PHP running on 2 other servers with no problem.

My problem is simple to explain but I have been unable to make it go away.
Whenever I access a .php file my computer pops up with a download screen
instead of displaying the desired results of the page.

I forgot to include what I see when I do server-info with apache:

Module Name: mod_php5.c
Content handlers: application/x-httpd-php , application/x-httpd-php-source ,
text/html
Configuration Phase Participation: Create Directory Config, Merge Directory
Configs, Child Exit
Request Phase Participation: none
Module Directives:
php_value - PHP Value Modifier
php_flag - PHP Flag Modifier
php_admin_value - PHP Value Modifier (Admin)
php_admin_flag - PHP Flag Modifier (Admin)
PHPINIDir - Directory containing the php.ini file
Current Configuration:

It looks like it loads it OK.



This is what I have in httpd.conf:

LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so
AddModule mod_php5.c
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php

<IfModule mod_mime.c>

AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddHandler php5-script .php
AddHandler php5-script .php3

</IfModule>

Am I missing a line somewhere?

Thanks
Frank

Frank DeChellis
President, Internet Access Worldwide
Welland, Ontario, Canada
www.iaw.com
Keith Roberts
2008-12-24 19:20:02 UTC
Permalink
Subject: [PHP-INSTALL] PHP files coming up as files to download? (Part 2)
Hi there,
I am new to this list.
I have Apache 1.3.41, PHP 5.2.8 running on NetBSD 4.0.1.
This install is new. I have Apache and PHP running on 2
other servers with no problem.
My problem is simple to explain but I have been unable to
make it go away. Whenever I access a .php file my computer
pops up with a download screen instead of displaying the
desired results of the page.
application/x-httpd-php , application/x-httpd-php-source ,
text/html Configuration Phase Participation: Create
Directory Config, Merge Directory Configs, Child Exit
php_value - PHP Value Modifier php_flag - PHP Flag
Modifier php_admin_value - PHP Value Modifier (Admin)
php_admin_flag - PHP Flag Modifier (Admin) PHPINIDir -
Directory containing the php.ini file Current
It looks like it loads it OK.
LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so
AddModule mod_php5.c
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
<IfModule mod_mime.c>
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddHandler php5-script .php
AddHandler php5-script .php3
</IfModule>
Am I missing a line somewhere?
Thanks
Frank
It looks like your php-enabled pages are not being parsed
properly by the php module.

Just try this in httpd.conf without the IfModule mod_mime.c stuff:

LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so

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


Don't think you need this line:
AddModule mod_php5.c

as the php module is already loaded with:
LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so


HTH

Keith

-----------------------------------------------------------------
Websites:
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
Frank DeChellis
2008-12-24 20:17:05 UTC
Permalink
WORKS!!!!

Thanks. Looks like I "over" configured it.

Merry Christmas to everybody.

Frank
Post by Keith Roberts
Subject: [PHP-INSTALL] PHP files coming up as files to download? (Part 2)
Hi there,
I am new to this list.
I have Apache 1.3.41, PHP 5.2.8 running on NetBSD 4.0.1.
This install is new. I have Apache and PHP running on 2
other servers with no problem.
My problem is simple to explain but I have been unable to
make it go away. Whenever I access a .php file my computer
pops up with a download screen instead of displaying the
desired results of the page.
application/x-httpd-php , application/x-httpd-php-source ,
text/html Configuration Phase Participation: Create
Directory Config, Merge Directory Configs, Child Exit
php_value - PHP Value Modifier php_flag - PHP Flag
Modifier php_admin_value - PHP Value Modifier (Admin)
php_admin_flag - PHP Flag Modifier (Admin) PHPINIDir -
Directory containing the php.ini file Current
It looks like it loads it OK.
LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so
AddModule mod_php5.c
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
<IfModule mod_mime.c>
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddHandler php5-script .php
AddHandler php5-script .php3
</IfModule>
Am I missing a line somewhere?
Thanks
Frank
It looks like your php-enabled pages are not being parsed
properly by the php module.
LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddModule mod_php5.c
LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so
HTH
Keith
-----------------------------------------------------------------
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
Frank DeChellis
President, Internet Access Worldwide
Welland, Ontario, Canada
www.iaw.com
Keith Roberts
2008-12-24 22:27:47 UTC
Permalink
Pleased to hear that Frank.

Hope you all have a very merry Christmas and a happy new
year.

Best Wishes

Keith Roberts
Subject: Re: [PHP-INSTALL] PHP files coming up as files to download? (Part 2)
WORKS!!!!
Thanks. Looks like I "over" configured it.
Merry Christmas to everybody.
Frank
Post by Keith Roberts
Subject: [PHP-INSTALL] PHP files coming up as files to download? (Part 2)
Hi there,
I am new to this list.
I have Apache 1.3.41, PHP 5.2.8 running on NetBSD 4.0.1.
This install is new. I have Apache and PHP running on 2
other servers with no problem.
My problem is simple to explain but I have been unable to
make it go away. Whenever I access a .php file my computer
pops up with a download screen instead of displaying the
desired results of the page.
application/x-httpd-php , application/x-httpd-php-source ,
text/html Configuration Phase Participation: Create
Directory Config, Merge Directory Configs, Child Exit
php_value - PHP Value Modifier php_flag - PHP Flag
Modifier php_admin_value - PHP Value Modifier (Admin)
php_admin_flag - PHP Flag Modifier (Admin) PHPINIDir -
Directory containing the php.ini file Current
It looks like it loads it OK.
LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so
AddModule mod_php5.c
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
<IfModule mod_mime.c>
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddHandler php5-script .php
AddHandler php5-script .php3
</IfModule>
Am I missing a line somewhere?
Thanks
Frank
It looks like your php-enabled pages are not being parsed
properly by the php module.
LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddModule mod_php5.c
LoadModule php5_module /usr/pkg/lib/httpd/mod_php5.so
HTH
Keith
-----------------------------------------------------------------
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
Frank DeChellis
President, Internet Access Worldwide
Welland, Ontario, Canada
www.iaw.com
Loading...