php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45691 some per-dir or runtime settings may leak into other requests
Submitted: 2008-08-02 20:18 UTC Modified: 2008-08-02 20:56 UTC
From: moriyoshi@php.net Assigned: moriyoshi (profile)
Status: Closed Package: mbstring related
PHP Version: 5.2.6 OS: Irrelevant
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: moriyoshi@php.net
New email:
PHP Version: OS:

 

 [2008-08-02 20:18 UTC] moriyoshi@php.net
Description:
------------
Some per-dir or runtime settings that is set in a request pollutes the global state of the extension and they leak into another request when the web server's forked instances are reused between connections and no corresponding system settings are provded.


Reproduce code:
---------------
<?php
// run without any system settings.

// if the language is set to neutral,
// the default value for the internal encoding is ISO-8859-1
var_dump(mb_internal_encoding());
ini_set('mbstring.internal_encoding', 'UTF-8');
var_dump(mb_internal_encoding());
?>


Expected result:
----------------
The first request:
ISO-8859-1
UTF-8

The second request:
ISO-8859-1
UTF-8

Actual result:
--------------
The first request:
ISO-8859-1
UTF-8

The second request:
UTF-8
UTF-8

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-02 20:56 UTC] moriyoshi@php.net
This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC