php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19295 header( "Content-Type: text/whatever" ) becomes modified to default_mimetype
Submitted: 2002-09-08 18:57 UTC Modified: 2002-10-14 19:26 UTC
Votes:3
Avg. Score:2.7 ± 1.2
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: j-devenish at users dot sourceforge dot net Assigned:
Status: No Feedback Package: Output Control
PHP Version: 4.2.3 OS: Solaris 8
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: j-devenish at users dot sourceforge dot net
New email:
PHP Version: OS:

 

 [2002-09-08 18:57 UTC] j-devenish at users dot sourceforge dot net
(I recently compiled PHP 4.2.3 for Apache 1.3.26 under Solaris 8 using gcc 2.95.2 using the same process that I used for PHP 4.2.2. The only difference is that I also recompiled Apache with a newer version of mod_perl.)

When using the header( string[, bool[, int]] ) function with a string parameter of the form "Content-Type: text/...", where "..." is any valid type that I have so far attempted to use, the response headers sent by Apache contain only "Content-Type: text/html", or whatever the default_mimetype is. (I tried changing the default_mimetype in php.ini and confirmed that it was being used.) If "Content-Type: image/..." is used (for example) then Apache sends that Content-Type (i.e. only "text/..." seems to be affected). I am not certain that this is Apache 1.3.26/mod_php4-specific because I have not yet tested with other web servers. This did not appear to occur in PHP 4.2.2, which is what we were running last Friday.

./configure --with-apxs=/usr/apache/bin/apxs --with-config-file-path=/etc/apache --disable-short-tags --enable-calendar --with-mysql=/usr/local/mysql --with-gdbm=/opt/sfw --with-tiff=/usr --with-gd=/usr/local --includedir=/usr/local/include --with-mcrypt --with-java=/usr/java --with-xml --with-tsrm-pthreads --with-imap=/usr/local/stow/imap-2000c --with-zlib --with-jpeg-dir=/opt/sfw --with-png-dir=/opt/sfw --with-ttf=/usr/local --with-t1lib-dir --with-ldap

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-09 19:19 UTC] j-devenish at users dot sourceforge dot net
After browsing CVS diffs, I suspect that this is not Apache/mod_php4-specific. I see a lot of changes (between 4.2.2 and 4.2.3) in php4/ext/mbstring/mbstring.c and php4/main/SAPI.c.
 [2002-09-09 19:20 UTC] j-devenish at users dot sourceforge dot net
Commonplace effects of this problem: formatted monospace text appears as run-on proportionally-spaced text ('text/html' sent instead of 'text/plain'); Mozilla doesn't recognise stylesheets (requires 'text/css').
 [2002-09-12 19:52 UTC] j-devenish at users dot sourceforge dot net
Specifying an explicit charset in PHP scripts causes the desired header to be sent:

header( "Content-Type: text/plain" ); # has no effect
header( "Content-Type: text/plain; charset=blah" ); # gets sent
 [2002-09-20 23:01 UTC] j-devenish at users dot sourceforge dot net
See also bug #19098. Can confirm that workaround posted by <skamp@skamp.org> works for me. <sniper@php.net> indicates problem probably fixed in CVS.
 [2002-09-23 18:32 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-10-14 19:26 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 14:01:30 2024 UTC