From: wf at bitplan dot com
Operating system: Windows XP
PHP version: 5.1.4
PHP Bug Type: Reproducible crash
Bug description: Wddx serializer and umlaute in $_SESSION variables don't work
together
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 bug report at http://bugs.php.net/?id=38213&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=38213&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=38213&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=38213&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38213&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=38213&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38213&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38213&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38213&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38213&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38213&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=38213&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=38213&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38213&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38213&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38213&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38213&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38213&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38213&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38213&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38213&r=mysqlcfg