|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31146 default_charset variable is not used
Submitted: 2004-12-17 10:31 UTC Modified: 2005-01-31 22:35 UTC
From: mitya at demos dot su Assigned:
Status: No Feedback Package: PHP options/info functions
PHP Version: 4.3.10 OS: Solaris 9
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-12-17 10:31 UTC] mitya at demos dot su
I am using PHP 4.3.10 with Apache 1.3.29 as DSO module.
I changed default_charset variable in php.ini to a custom
value ("koi8-r").  phpinfo() reports that the value of this variable is in fact "koi8-r".

But HTTP headers for any PHP page on my server looks as follows: Content-type=text/html; charset=

that is charset is empty.

I wonder is it a bug or an intended behaviour (what are the reasons to not apply the value of charset specified in php.ini in that case)?

Thanks in advance!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-17 10:36 UTC]
I can not reproduce this, it works fine for me. (On both PHP 4 and 5).
 [2004-12-24 12:59 UTC] mitya at demos dot su
The problem becomes much less bogus if I add the following information:

1) I use apache from Solaris packages (SUNWapchr, SUNWapchu)
with the latest patches available (113146-06)
2) The vital part of php.ini to reproduce the problem is:
magic_quotes_gpc = Off

Without this line the problem does not exist.
To reveal the problem use the following php.ini:
magic_quotes_gpc = Off
default_charset = "koi8-r"
 [2004-12-30 11:51 UTC]
I've never had magic_quotes_gpc set to anything but 'off'. 
So I still can't reproduce this.

 [2005-01-10 01:46 UTC]
What was the configure line you used to configure PHP?

 [2005-01-10 08:26 UTC] mitya at demos dot su
./configure --prefix=/usr/apache --sysconfdir=/etc/apache
--with-apxs=/usr/apache/bin/apxs --disable-cgi --with-config-file-path=/etc/apache --disable-ipv6 --without-mysql --with-snmp=/usr/local --enable-memory-limit

I have the latest net-snmp installed from

Is there any chance the problem is that apache was compiled (by SUN) with SUN Workshop compiler and I am compiling PHP with GNU C compiler?
 [2005-01-13 04:31 UTC]
Please try using this CVS snapshot:
For Windows:

Yes, it is possible. Try compiling Apache with same tools as you compile PHP.

 [2005-01-31 22:35 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 20:01:31 2024 UTC