|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-02 15:45 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
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.