php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28383 error/warning using dump_mem() and ISO-8859-1
Submitted: 2004-05-13 11:31 UTC Modified: 2004-05-15 13:03 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: pog at grumpf dot net Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.3.6 OS: FreeBSD 4.10-RC
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
50 - 31 = ?
Subscribe to this entry?

 
 [2004-05-13 11:31 UTC] pog at grumpf dot net
Description:
------------
I got warning/error using dump_mem(true,'ISO-8859-1') and accentuation 

put a '?/?/?/?' or any accent char and press 'go'

that crash converter


$xmlDoc->dump_mem(true, 'ISO-8859-1');


Reproduce code:
---------------
<?
if (!isset ($submit)) { ?>
<form action="<?php echo $SCRIPT_NAME ?>" method="POST">
champ1 : <input type="text" name="txt1" /><br/>
champ2 : <input type="text" name="txt2" /><br/>
champ3 : <input type="text" name="txt3" /><br/>
<input type="submit" name="submit" value="go" /><br/>
</form>
<?
} else {
	$xmlDoc = domxml_new_doc('1.0');
	$root = $xmlDoc->add_root("root");
	while(list($key, $value) = each($HTTP_POST_VARS)) {
		$nodeName = $root->new_child($key, $value);
	};
	echo $xmlDoc->dump_mem(true, 'ISO-8859-1');
};
?>

Expected result:
----------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
  <txt1>?</txt1>
  <txt2></txt2>
  <txt3></txt3>
  <submit>go</submit>
</root>

Actual result:
--------------
Warning: dump_mem(): output conversion failed due to conv error in /usr/home/pog/public_html/test/form2.php on line 17

Warning: dump_mem(): Bytes: 0xE9 0x3C 0x2F 0x74 in /usr/home/pog/public_html/test/form2.php on line 17

Warning: dump_mem(): encoder error in /usr/home/pog/public_html/test/form2.php on line 17



if you look at html source: 

<br />
<b>Warning</b>:  dump_mem(): output conversion failed due to conv error
 in <b>/usr/home/pog/public_html/test/form2.php</b> on line <b>17</b><br />
<br />
<b>Warning</b>:  dump_mem(): Bytes: 0xE9 0x3C 0x2F 0x74
 in <b>/usr/home/pog/public_html/test/form2.php</b> on line <b>17</b><br />
<br />

<b>Warning</b>:  dump_mem(): encoder error in <b>/usr/home/pog/public_html/test/form2.php</b> on line <b>17</b><br />
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
  <txt1>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-13 13:30 UTC] pog at grumpf dot net
have problem on :
-- 
FreeBSD 4.10-rc apache 2.0.49 php 4.3.6 
domxml
DOM/XML 	enabled
DOM/XML API Version 	20020815
libxml Version 	20608
HTML Support 	enabled
XPath Support 	enabled
XPointer Support 	enabled
DOM/XSLT 	enabled
libxslt Version 	1.1.6
libxslt compiled against libxml Version 	2.6.8
DOM/EXSLT 	enabled
libexslt Version 	1.1.6


--
linux 2.4.21 apache 2.0.46 php 4.3.6
domxml
DOM/XML 	enabled
DOM/XML API Version 	20020815
libxml Version 	20507
HTML Support 	enabled
XPath Support 	enabled
XPointer Support 	enabled
 [2004-05-15 13:03 UTC] rrichards@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC