php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26443 No errror reporting for Errors in the domxml extension
Submitted: 2003-11-28 03:19 UTC Modified: 2004-01-07 09:17 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: thomas dot sattler at decon-network dot de Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4CVS-2004-01-05 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thomas dot sattler at decon-network dot de
New email:
PHP Version: OS:

 

 [2003-11-28 03:19 UTC] thomas dot sattler at decon-network dot de
Description:
------------
When I use Apache 1.3.29 with php4apache.dll there is no error reporting.
With the php.exe the errors are reported.

This occurs also with php-4.3.4 and php.4.3.5.5 but not with the php.exe.

Reproduce code:
---------------
<?php
ini_set("display_errors", "1");
$xmlstr='<?xml version="1.0" encoding="UTF-8"?>
<udk-result:udk xmlns:udk-result="http://www.umweltdatenkatalog.de/udk/query-answer">
	<udk-result:data-source server-id="BW">
	</udk-result:data-source>
</udk-result:udka>'; ?><?php
if(!$doc = domxml_open_mem($xmlstr)) print "ERROR!";
else {print_r ($doc);
$root=$doc->document_element();}
$xmltest = domxml_new_doc("1.0");
$xmlroot = $xmltest->create_element("testtag");
$xmlroot = $xmltest->append_child($xmlroot);
$xmlroot->set_content("content ? rest content");
$test_text = $xmltest->dump_mem(0, 'iso-8859-1');
print "<pre> $test_text </pre>";
?>

Expected result:
----------------
Warnings on line 8 domxml_open_mem() (xml-string is not well formed) and on line 15 "dump_mem(): output conversion failed due to conv error" (the euro symbol is not iso-8859-1)

Actual result:
--------------
The output is only:
ERROR!<pre> <?xml version="1.0" encoding="iso-8859-1"?>
<testtag>content  </pre>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-28 07:53 UTC] iliaa@php.net
Check your error_reporting level. Or do error_reporting(E_ALL); at the start of the script.
 [2003-11-28 08:04 UTC] thomas dot sattler at decon-network dot de
Error reporting level is set to E_ALL

With php 4.2.3 error reporting works well in the same environment (php.ini, apache ...)
 [2003-11-30 14:13 UTC] sniper@php.net
Tested within WinXP + Apache2..and there is no way to get the errors to show up in the browser. (works fine with cli)
Here's short test script:

<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
echo foobar;
$xmlstr='<?xml version="1.0" encoding="UTF-8"?><foo>';
$doc = domxml_open_mem($xmlstr);
var_dump($doc);
?>

This will output something like this:

Notice: Use of undefined constant foobar - assumed 'foobar' in C:\apache\Apache-2.0.47\htdocs\bug26443.php on line 6
foobarbool(false) 

Works fine in *nix, so I guess this is some ZTS problem.
The error messages appear in the apache error_log after
I shutdown apache..

 [2003-12-01 02:15 UTC] sniper@php.net
Note: All errors NOT coming from domxml are displayed just fine. 

 [2003-12-01 11:18 UTC] rrichards@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2003-12-03 04:44 UTC] thomas dot sattler at decon-network dot de
This bug is not fixed for the domxml_dump_mem() in the following example:

<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
echo foobar;
$doc = domxml_new_doc("1.0");
$root = $doc->create_element("bar");
$root = $doc->append_child($root);
$root->set_content("content ? rest content");
var_dump($doc);
$test_text = $doc->dump_mem(0, 'iso-8859-1');
print htmlspecialchars($test_text);
?>

The warnings
dump_mem(): output conversion failed due to conv error
dump_mem(): Bytes: 0x80 0x20 0x72 0x65 
dump_mem(): xmlOutputBufferFlush: encoder error 

are missing.
 [2003-12-03 05:36 UTC] rrichards@php.net
What webserver are you using? If IIS is it run in or out of process?
 [2003-12-03 05:46 UTC] thomas dot sattler at decon-network dot de
I am using Apache 1.3.29 with the php4apache.dll (see the description of the bug).
 [2003-12-03 07:30 UTC] rrichards@php.net
suspending until the libxml/libxslt versions are hashed out for windows build
 [2004-01-07 09:17 UTC] thomas dot sattler at decon-network dot de
Now it's working fine!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 18 11:01:28 2024 UTC