Weird apache problem



I'm having a problem figuring out what the heck is wrong with a webserver. Any suggestions would be welcomed.

It's running Apache and php4 (with Apache module selected using make config), and when you try to load a page (Squirrelmail) using Firefox, you get a popup asking you what to do with the file. (You have chosen to open ..which is a: application/x-httpd-php from: https://webmail.stovebolt.com What should Firefox do with this file?

The page loads fine in Internet Explorer.

The load module and add module lines exist in the httpd.conf file and the webserver has been restarted repeatedly, with no errors. There's no errors in the httpd-error log. The libphp4.so file exists in the correct directory.

uname -a
FreeBSD stovebolt.stovebolt.com 5.4-SECURITY FreeBSD 5.4-SECURITY

httpd -V
Server version: Apache/1.3.36 (Unix)
Server built: Jun 3 2006 11:20:12

php -v
PHP 4.4.2 (cli) (built: Jun 5 2006 13:56:53)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

grep php /usr/local/etc/apache/httpd.conf

LoadModule php4_module libexec/apache/libphp4.so
AddModule mod_php4.c
<IfModule mod_php3.c>
<IfModule mod_php4.c>
DirectoryIndex index.php index.php3 index.html index.htm
<IfModule !mod_php4.c>
DirectoryIndex index.php3 index.html index.htm
<IfModule !mod_php3.c>
<IfModule mod_php4.c>
DirectoryIndex index.php index.html index.htm
<IfModule !mod_php4.c>
DirectoryIndex index.html index.htm index.php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Redirect / https://webmail.stovebolt.com/index.php
<Files ~ "\.(cgi|shtml|phtml|php|php3?|php4?)$">
# <Files ~ "\.(cgi|shtml|phtml|php3?|php4?)$">
<Files ~ "\.(cgi|shtml|phtml|php3?)$">

The only thing that strikes me as odd is that there's no dependency for php related to apache:

pkg_info -r apache*
Information for apache+mod_ssl-1.3.36+2.8.27:

Depends on:
Dependency: mm-1.4.0
Dependency: expat-2.0.0_1

pkg_info -R apach*
Information for apache+mod_ssl-1.3.36+2.8.27:

Required by:
mod_perl-1.29_1
mod_security-1.9.2
squirrelmail-1.4.6

--
Paul Schmehl (pauls@xxxxxxxxxxxx)
Adjunct Information Security Officer
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Relevant Pages

  • Re: Apache, php?
    ... on the command line doing `php index.php` works. ... The only difference is that I'm using 1.3 and not 2.x of Apache. ... DirectoryIndex index.php index.php3 index.html ... AddType application/x-httpd-php .php ...
    (freebsd-questions)
  • Re: Index.php does not open up
    ... I am a newbie in PHP and I am enthusiastically trying out things. ... I am running php 5 and apache 2.xxx and modified idex.html to indexHtml.html to avoid the webserver serving the page). ... The parameter is called DirectoryIndex. ... That's OK for me because if I consciously rewrite an index.html to be dynamic making it an index.php I am replacing the index.html so I'd simply remove it. ...
    (comp.lang.php)
  • Re: Apache, php?
    ... on the command line doing `php index.php` works. ... The only difference is that I'm using 1.3 and not 2.x of Apache. ... DirectoryIndex index.php index.php3 index.html ... I install them in the following order. ...
    (freebsd-questions)
  • Re: Apache, php?
    ... on the command line doing `php index.php` works. ... The only difference is that I'm using 1.3 and not 2.x of Apache. ... DirectoryIndex index.php index.php3 index.html ... AddType application/x-httpd-php .php ...
    (freebsd-questions)
  • Re: php installed but not working, help me troubleshoot?
    ... "john" wrote: ... > php doesn't work. ... I thought maybe I need to specify where Apache can find ... DirectoryIndex index.html index.shtml index.php index.html.var ...
    (alt.os.linux.suse)