php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18316 DefaultType application/x-httpd-php problem
Submitted: 2002-07-12 11:02 UTC Modified: 2002-07-12 14:56 UTC
From: phpbug at botanicus dot net Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4CVS-2002-07-12 OS: l00nix
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phpbug at botanicus dot net
New email:
PHP Version: OS:

 

 [2002-07-12 11:02 UTC] phpbug at botanicus dot net
.htaccess: DefaultType application/x-httpd-php
bleh:      <?php phpinfo(); ?>

---
$ curl -sI host/bleh     |grep Content-Type
Content-Type: application/x-httpd-php
$ ln -s bleh bleh.php
$ curl -sI host/bleh.php |grep Content-Type
Content-Type: text/html
---


In short, PHP doesn't seem to be used as the handler for
application/x-httpd-php when assumed file type is from a DefaultType or ForceType statement. :{

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-12 11:05 UTC] sander@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.
 [2002-07-12 13:28 UTC] phpbug at botanicus dot net
I can't see how this is not a bug report. PHP isn't functioning on Apache2
correctly (I know it is alpha). I'm just letting you guys know.
 [2002-07-12 14:56 UTC] derick@php.net
It works fine with the CVS of both apache and php, so you are doing something wrong somewhere, hence it's not a bug.
If you still think it's a bug, feel free to provide more information (and it looks like a problem in apache anyway).

Derick
 [2003-03-31 11:21 UTC] jm4n at yahoo dot com
I get similar results on a Raq4 (Apache 1.3.20 and PHP 4.1.2). If I name a file "blah.html.php", I get a content-type of "application/x-httpd-php" -- but the file is not parsed; the PHP script is sent to the browser.

I suspect something in the PHP module is deciding not to parse the file, even though it should (due to the .php extension and appropriate content-type). The original reporter's problem is similar, in that he is forcing the content-type on a non .php filename (in this case a symlink). In my case, blah.php works fine, blah.html.php isn't parsed.

Does this make sense? I would have thought that any file extension you set to "application/x-httpd-php" would be parsed as a PHP script, but this doesn't appear to be the case.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 15:01:36 2025 UTC