XML_Serializer problem on Windows
| From: | Eike Herzbach | Date: | Wed, 12 Oct 2005 18:46:22 +0000 |
| Subject: | XML_Serializer problem on Windows | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-21407@lists.php.net to get a copy of this message | ||
Hi,
this:
$data = array ("a" => "b");
$serializer_options = array (
'addDecl' => TRUE,
'encoding' => 'ISO-8859-1',
'indent' => ' ',
'indentAttributes' => '_auto',
'rootName' => 'content',
'defaultTagName' => 'item',
'mode' => 'simplexml'
);
$Serializer = &new XML_Serializer($serializer_options);
$status = $Serializer->serialize($data);
print_r($Serializer->getSerializedData());
works just fine as it should under linux.
but under windows (xampp 1.4.12 / PHP4.3.10) it produces the following:
<br />
<b>Warning</b>: call_user_func(): First argument is expected to be a valid callback in <b>c:\programme\xampp\php\pear\XML\Serializer.php</b> on line <b>1003</b><br />
<br />
<b>Warning</b>: array_map(): The first argument, '', should be either NULL or a valid callback in <b>c:\programme\xampp\php\pear\XML\Serializer.php</b> on line <b>1005</b><br />
<br />
<b>Warning</b>: array_map(): The first argument, '', should be either NULL or a valid callback in <b>c:\programme\xampp\php\pear\XML\Serializer.php</b> on line <b>1005</b><br />
<?xml version="1.0" encoding="ISO-8859-1"?><:content> <:a /></:content>
in my application this output is then saved to a mysql DB, and there it looks like this:
<?xml version="1.0" encoding="ISO-8859-15"?>\0<\0\0\0\0:content>\0 <\0\0\0\0:a />\0 </\0\0\0\0:content>
(note the backslash-zeroes..)
of course, this data can't be read unserialized again.
any clues?
regards,
eike