ID:               36517
 Comment by:       wbotkin at digifonica dot com
 Reported By:      phuttunen at digifonica dot com
 Status:           Assigned
 Bug Type:         SimpleXML related
 Operating System: FreeBSD 6.0-RELEASE-p4
 PHP Version:      5.1.2
 Assigned To:      helly
 New Comment:

Additional information:
 This bug can be split into three parts:

1)Different soap servers (different versions of PHP) are handeling the
base64 type differently. Earlier version are sending it as base64
encoded, later are not. 

2)The soap client sees the base64 type and tries to base64 decode the
value (but some servers don't send it base64 encoded). The memory
exhaustion error seems to come from this attempt to base64 decode a
value that is not a base64 value.

3)There are still xml bugs with the simple xml. We were mistaken to
think that the memory exhaustion error had to do with the xml parsing.
But there are cases where simple xml does fail for no apparent reason.


Notes:
 The memory exhaustion error may not be re-producible on a single
machine. The difference between the client and the server in handeling
native base64 types in xml seems to be the issue.


Previous Comments:
------------------------------------------------------------------------

[2006-03-13 10:31:54] [EMAIL PROTECTED]

Please provide a backtrace.

The most interesting information would be to set a brakepoint on
zend_error() and show the backtrace. It would further more be
interesting to run this thing in valgrind/memcheck.

And please stop flooding the bug site or this bug will simply be
closed. You made it impossible to get any relevant information here.

------------------------------------------------------------------------

[2006-03-10 13:57:53] [EMAIL PROTECTED]

I still cannot reproduce memory overflow with your new code.

The output is different dependent on 'make_simple_xml_that_works', but
seems this is not a bug. Seems simplexml should produce such output by
design.

The test script doesn't use ext/soap, so the bug cannot be ext/soap
dependent. 

Reassigned to simplexml maintainer.

------------------------------------------------------------------------

[2006-03-06 22:21:28] phuttunen at digifonica dot com

Tested with various PHP versions and libxml2-2.6.23.
The example codes work fine with PHP-5.0.4 and 5.0.5 (w/libxml-2.6.23),
but not with any PHP-5.1.X versions. 
This implies that the problem is also related to PHP/SOAP and not just
SimpleXML.

------------------------------------------------------------------------

[2006-03-02 17:53:53] phuttunen at digifonica dot com

Tested with higher memory_limit values (10M, 20M, 40M, 200M), but could
not get the code to work.
I agree that the problem it more like simplexml than soap, but it's the
soap response that causes simplexml to fail.
I created another test program
(http://www3.telus.net/pena/test_parse_xml-2.php.txt) that should show
the problem more clearly. Change variable
'make_simple_xml_that_works=1' on line 6 to see the expected output.
Set the variable to 0 to see the incorrect output.

------------------------------------------------------------------------

[2006-03-02 15:21:17] [EMAIL PROTECTED]

The bug is not releated to ext/soap.

It is probably releated to somplexml, but I cannot reproduce it. May be
you have very small memory_limit setting in yor php.ini?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/36517

-- 
Edit this bug report at http://bugs.php.net/?id=36517&edit=1

Reply via email to