|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12989 php sets the wrong default header (use not mimetypes)
Submitted: 2001-08-28 02:37 UTC Modified: 2001-11-03 22:05 UTC
From: tf at tfromm dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.0.6 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tf at tfromm dot com
New email:
PHP Version: OS:


 [2001-08-28 02:37 UTC] tf at tfromm dot com
i want to parse .wml sites with php, the problem is the default 

when i not have added 
AddType application/x-httpd-php .wml 
in the httpd.conf, then everything its fine and apache returned
the korrekt header in pure .wml sites (without php stuff).
my mimetype entry 
text/vnd.wap.wml                wml  
works in this case.

when i add
AddType application/x-httpd-php .wml 
to the apache config, the mimetype settings are useless :-(
apache sends by default text/html and i have to rework als .wml 
sites and have to add a line at first::
<?php header("Content-Type: text/vnd.wap.wml");?>
thats very bad, if i have lots of such sites, which were at first 
plain wml.

i wanted to rename all .php sites to .wml, if they produce wml 
code, because i want to avoid problems with wap browsers 
which are looking for the filepostfix...
imho should php set the header using mimetypes settings.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-03 22:05 UTC]
You can use this php.ini directive to set the 

default_mimetype = text/vnd.wap.wml

This can also be set within httpd.conf / .htaccess files:

php_value default_mimetype text/vnd.wap.wml


 [2003-01-27 05:01 UTC] dick_bzz at poczta dot onet dot pl
And what about WWW servers used for HTML(php) and WML(php)(simultaneously)?
Setting default_mimetype to WML allocating server ONLY for WML(php)
 [2003-05-06 04:34 UTC] rejish_tk at yahoo dot com
is it possible to use variables in header function.

Eg. header("Location :" . $refpage);

where refpage contains the referer to a page ie., the complete path like "http:\\test\seethis.php";

will this work.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 12:01:26 2024 UTC