#38213 [Asn->Csd]: Wddx serializer and umlaute in $_SESSION variables don't work together
| From: | iliaa@php.net | Date: | Wed, 02 Aug 2006 15:45:50 +0000 |
| Subject: | #38213 [Asn->Csd]: Wddx serializer and umlaute in $_SESSION variables don't work together | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100237@lists.php.net to get a copy of this message | ||
ID: 38213
Updated by: iliaa@php.net
Reported By: wf at bitplan dot com
-Status: Assigned
+Status: Closed
Bug Type: Session related
Operating System: Windows XP
PHP Version: 5.1.4
Assigned To: iliaa
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2006-07-26 00:00:30] wf at bitplan dot com
Description:
------------
When setting the serialize handler to wddx in php.in:
session.serialize_handler = wddx
using any Umlaut in a $_SESSION variable will lead to misbehaviour of
the system e.g. Apache crashing or the session file content to be
destroyed
Reproduce code:
---------------
sesstest1.php:
=============
<?php
session_start();
$_SESSION['sess_var'] = "äöüßÄÖÜßé";
session_write_close();
echo "The content is ". $_SESSION['sess_var']. "<br />";
?>
<a href="sesstest2.php?<?php echo SID?>">Page 2 </a>
sesstest2.php:
=============
<?php
session_start();
echo "The content is ".$_SESSION['sess_var']."<br />";
unset ($_SESSION['sess_var']);
session_write_close();
?>
<a href="sesstest1.php?<?php echo SID?>">Page 1</a>
Expected result:
----------------
there are several ways to do this properly, one is to set the
encoding:
<?xml version="1.0" encoding="ISO-8859-1"?>
in the first line of the wddx file, another one is to use utf-8
encoding on encoding and decoding
Actual result:
--------------
<wddxPacket version='1.0'><header/><data><struct><var
name='sess_var'><string>äöüßÄÖÜßé</string></var></struct></data></wddxPacket>
And the system might throw-up on decoding when e.g. using french,
spanish, swedish or other accented characters.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38213&edit=1