php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25009 PHP files being downloaded on 404's if application/x-httpd-php contains da ext.
Submitted: 2003-08-10 21:08 UTC Modified: 2003-08-10 21:15 UTC
From: mjsabby at yahoo dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.3.3RC3 OS: Redhat Linux 9 (2.4.20)
Private report: No CVE-ID: None
 [2003-08-10 21:08 UTC] mjsabby at yahoo dot com
Description:
------------
Hello,

I don't know why it is so strange but this is a bug it seems.

I'm running Apache 2.0.47, and PHP 4.3.3RC3

When I add these lines to my apache conf file :

AddType application/x-httpd-php .php .html

And run my PHP scripts, eveyrhting goes great, for both php and html files. Now what happens is that I also have an ErrorDocument 404 /404.html

Now when a 404 occurs, both these files get downloaded, and it says downloading file of type application/x-httpd-php, and there is no content in it, so in IE it says cannot download in Netscape it downloads with 0 byte data.

And when I remove an extension say most of my 404's will be from a .php file since I've moved my server, so I removed that and when a 404 for .php files, it works!

Thanks.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-10 21:10 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2003-08-10 21:13 UTC] mjsabby at yahoo dot com
It has okies, I need to read up how to get files from CVS, don't know how it's done.

anyway may be i'll try PHP5
 [2003-08-10 21:15 UTC] sniper@php.net
Oops..keep closed, it's really fixed.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC