Ask a Question related to PHP Bugs, Design and Development.
-
robin dot harvey at chaptereight dot com #1
#40609 [NEW]: Segfaults when using more than one SoapVar in a request
From: robin dot harvey at chaptereight dot com
Operating system: Linux - Ubuntu
PHP version: 5.2.1
PHP Bug Type: SOAP related
Bug description: Segfaults when using more than one SoapVar in a request
Description:
------------
I've got a very simple soap service (written in Java/Tomcat/Axis) which
simply accepts and logs the XML of a soap request. I need to post complex
XML to the server (an XSL stylesheet) and I'm using SoapVar with XSD_ANYXML
and dealing with the XSL as a string in PHP. When I try to add more than
one SoapVar object encoded in this way, PHP segfaults. It's happy with 1
param as a SoapVar, and with both as simple strings.
Reproduce code:
---------------
<?php
$s = new
SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
$data1 = <<<XML
<meta>
<properties>
<of>the transform go here!</of>
</properties>
</meta>
XML;
$data2 = <<<XML
<more>
<nice>Random content</nice>
<being>sent to the soap server</being>
</more>
XML;
$tdata = new SoapVar($data1, XSD_ANYXML);
$t = new SoapVar($data2, XSD_ANYXML);
$data = array('TransformData' => $tdata, 'Transform' => $t);
//$data = array('TransformData' => 'foo', 'Transform' => 'bar');
$s->examine($data);
?>
Expected result:
----------------
NULL. The service is 'In only'
Actual result:
--------------
robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php test-client-joe.php
Segmentation fault (core dumped)
--
Edit bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40609&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40609&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40609&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40609&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40609&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40609&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40609&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40609&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40609&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40609&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40609&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40609&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40609&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40609&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40609&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40609&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40609&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40609&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40609&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40609&r=mysqlcfg[/url]
robin dot harvey at chaptereight dot com Guest
-
What is the difference between REQUEST and REQUEST.QUERYSTRING?
What is the difference between these two statements? They seem to do the same thing... response.write(request("variable")) ... -
#39819 [NEW]: PHP always segfaults with --without-sqlite
From: matteo at beccati dot com Operating system: NetBSD PHP version: 4.4.4 PHP Bug Type: Reproducible crash Bug... -
Confused about a REQUEST.FORM and a REQUEST.QUERYSTRING
This is snipit of code, supplied by PayPal with explanation about what has to be done to access their back end. I am confused because they first... -
best way to get data: request.form, request.params, controlname.value
Hi! I think I remember somewhere that using request.form was a bad idea (I can't say I remember why). So I'm wondering: What is the best way to... -
difference bet. request.querystring and Request.Params
request.params for asp.net is the httprequest object, and this method gets a combined collection of querystring, cookies, form and servervars... -
rrichards@php.net #2
#40609 [Opn->Fbk]: Segfaults when using more than one SoapVar in a request
ID: 40609
Updated by: [email]rrichards@php.net[/email]
Reported By: robin dot harvey at chaptereight dot com
-Status: Open
+Status: Feedback
Bug Type: SOAP related
Operating System: Linux - Ubuntu
PHP Version: 5.2.1
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
[url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
[url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
An accessible WSDL might also be helpful
Previous Comments:
------------------------------------------------------------------------
[2007-02-23 17:12:38] robin dot harvey at chaptereight dot com
Description:
------------
I've got a very simple soap service (written in Java/Tomcat/Axis) which
simply accepts and logs the XML of a soap request. I need to post
complex XML to the server (an XSL stylesheet) and I'm using SoapVar
with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
try to add more than one SoapVar object encoded in this way, PHP
segfaults. It's happy with 1 param as a SoapVar, and with both as
simple strings.
Reproduce code:
---------------
<?php
$s = new
SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
$data1 = <<<XML
<meta>
<properties>
<of>the transform go here!</of>
</properties>
</meta>
XML;
$data2 = <<<XML
<more>
<nice>Random content</nice>
<being>sent to the soap server</being>
</more>
XML;
$tdata = new SoapVar($data1, XSD_ANYXML);
$t = new SoapVar($data2, XSD_ANYXML);
$data = array('TransformData' => $tdata, 'Transform' => $t);
//$data = array('TransformData' => 'foo', 'Transform' => 'bar');
$s->examine($data);
?>
Expected result:
----------------
NULL. The service is 'In only'
Actual result:
--------------
robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
test-client-joe.php
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
rrichards@php.net Guest
-
robin dot harvey at chaptereight dot com #3
#40609 [Fbk->Opn]: Segfaults when using more than one SoapVar in a request
ID: 40609
User updated by: robin dot harvey at chaptereight dot com
Reported By: robin dot harvey at chaptereight dot com
-Status: Feedback
+Status: Open
Bug Type: SOAP related
Operating System: Linux - Ubuntu
PHP Version: 5.2.1
New Comment:
Hi,
I've uploaded the Soap service to an accessible site, and produced a
backtrace, as requested. I've not used dbg before, so please let me
know if i've done something wrong. I recompiled php with
--enable-debug: heres the configure line:
'./configure' \
'--with-apxs2=/usr/bin/apxs2' \
'--with-zlib' \
'--with-bz2' \
'--with-pdo-mysql' \
'--with-pdo-pgsql' \
'--with-xsl' \
'--with-pear' \
'--enable-soap' \
'--enable-ftp' \
'--with-gd' \
'--enable-mbstring' \
'--enable-sockets' \
'--with-mcrypt' \
'--enable-debug'
Here's a copy of the php script I'm using:
<?php
$xml1 = <<<XML
<this>
<might>be nice for a <while/> old chum</might>
</this>
XML;
$xml2 = <<<XML
<ok>
Run it through <dbg/> to see what's going on
</ok>
XML;
$c = new
SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl');
$sv1 = new SoapVar($xml1, XSD_ANYXML);
$sv2 = new SoapVar($xml2, XSD_ANYXML);
$c->update(array('symbol' => $sv1, 'price' => $sv2));
?>
....and the dbg session, with a backtrace...
(gdb) set args /home/robin/tmp/40609.php
(gdb) run
Starting program: /usr/local/bin/php /home/robin/tmp/40609.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 46912533505280 (LWP 23881)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912533505280 (LWP 23881)]
0x0000000000642c51 in encode_add_ns ()
(gdb) bt
#0 0x0000000000642c51 in encode_add_ns ()
#1 0x0000000000639c62 in to_zval_user ()
#2 0x0000000000639f42 in to_zval_user ()
#3 0x000000000063a71d in to_zval_user ()
#4 0x00000000006420d5 in sdl_guess_convert_xml ()
#5 0x0000000000634b37 in master_to_xml ()
#6 0x000000000062c8c6 in add_soap_fault ()
#7 0x000000000062c781 in add_soap_fault ()
#8 0x000000000062ba97 in add_soap_fault ()
#9 0x0000000000624448 in zim_SoapClient_SoapClient ()
#10 0x0000000000625f40 in zim_SoapClient___call ()
#11 0x00000000007fd2f8 in zend_call_function ()
#12 0x0000000000827112 in zend_call_method ()
#13 0x0000000000830aca in zend_std_call_user_call ()
#14 0x0000000000834ecd in execute ()
#15 0x0000000000835daa in execute ()
#16 0x0000000000834912 in execute ()
#17 0x000000000080c9e8 in zend_execute_scripts ()
#18 0x00000000007ae109 in php_execute_script ()
#19 0x000000000089170a in main ()
Many thanks,
--Robin
Previous Comments:
------------------------------------------------------------------------
[2007-02-23 17:48:16] [email]rrichards@php.net[/email]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
[url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
[url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
An accessible WSDL might also be helpful
------------------------------------------------------------------------
[2007-02-23 17:12:38] robin dot harvey at chaptereight dot com
Description:
------------
I've got a very simple soap service (written in Java/Tomcat/Axis) which
simply accepts and logs the XML of a soap request. I need to post
complex XML to the server (an XSL stylesheet) and I'm using SoapVar
with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
try to add more than one SoapVar object encoded in this way, PHP
segfaults. It's happy with 1 param as a SoapVar, and with both as
simple strings.
Reproduce code:
---------------
<?php
$s = new
SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
$data1 = <<<XML
<meta>
<properties>
<of>the transform go here!</of>
</properties>
</meta>
XML;
$data2 = <<<XML
<more>
<nice>Random content</nice>
<being>sent to the soap server</being>
</more>
XML;
$tdata = new SoapVar($data1, XSD_ANYXML);
$t = new SoapVar($data2, XSD_ANYXML);
$data = array('TransformData' => $tdata, 'Transform' => $t);
//$data = array('TransformData' => 'foo', 'Transform' => 'bar');
$s->examine($data);
?>
Expected result:
----------------
NULL. The service is 'In only'
Actual result:
--------------
robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
test-client-joe.php
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
robin dot harvey at chaptereight dot com Guest
-
iliaa@php.net #4
#40609 [Opn->Asn]: Segfaults when using more than one SoapVar in a request
ID: 40609
Updated by: [email]iliaa@php.net[/email]
Reported By: robin dot harvey at chaptereight dot com
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: Linux - Ubuntu
PHP Version: 5.2.1
-Assigned To:
+Assigned To: dmitry
Previous Comments:
------------------------------------------------------------------------
[2007-02-24 14:08:31] robin dot harvey at chaptereight dot com
Hi,
I've uploaded the Soap service to an accessible site, and produced a
backtrace, as requested. I've not used dbg before, so please let me
know if i've done something wrong. I recompiled php with
--enable-debug: heres the configure line:
'./configure' \
'--with-apxs2=/usr/bin/apxs2' \
'--with-zlib' \
'--with-bz2' \
'--with-pdo-mysql' \
'--with-pdo-pgsql' \
'--with-xsl' \
'--with-pear' \
'--enable-soap' \
'--enable-ftp' \
'--with-gd' \
'--enable-mbstring' \
'--enable-sockets' \
'--with-mcrypt' \
'--enable-debug'
Here's a copy of the php script I'm using:
<?php
$xml1 = <<<XML
<this>
<might>be nice for a <while/> old chum</might>
</this>
XML;
$xml2 = <<<XML
<ok>
Run it through <dbg/> to see what's going on
</ok>
XML;
$c = new
SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl');
$sv1 = new SoapVar($xml1, XSD_ANYXML);
$sv2 = new SoapVar($xml2, XSD_ANYXML);
$c->update(array('symbol' => $sv1, 'price' => $sv2));
?>
....and the dbg session, with a backtrace...
(gdb) set args /home/robin/tmp/40609.php
(gdb) run
Starting program: /usr/local/bin/php /home/robin/tmp/40609.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 46912533505280 (LWP 23881)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912533505280 (LWP 23881)]
0x0000000000642c51 in encode_add_ns ()
(gdb) bt
#0 0x0000000000642c51 in encode_add_ns ()
#1 0x0000000000639c62 in to_zval_user ()
#2 0x0000000000639f42 in to_zval_user ()
#3 0x000000000063a71d in to_zval_user ()
#4 0x00000000006420d5 in sdl_guess_convert_xml ()
#5 0x0000000000634b37 in master_to_xml ()
#6 0x000000000062c8c6 in add_soap_fault ()
#7 0x000000000062c781 in add_soap_fault ()
#8 0x000000000062ba97 in add_soap_fault ()
#9 0x0000000000624448 in zim_SoapClient_SoapClient ()
#10 0x0000000000625f40 in zim_SoapClient___call ()
#11 0x00000000007fd2f8 in zend_call_function ()
#12 0x0000000000827112 in zend_call_method ()
#13 0x0000000000830aca in zend_std_call_user_call ()
#14 0x0000000000834ecd in execute ()
#15 0x0000000000835daa in execute ()
#16 0x0000000000834912 in execute ()
#17 0x000000000080c9e8 in zend_execute_scripts ()
#18 0x00000000007ae109 in php_execute_script ()
#19 0x000000000089170a in main ()
Many thanks,
--Robin
------------------------------------------------------------------------
[2007-02-23 17:48:16] [email]rrichards@php.net[/email]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
[url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
[url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
An accessible WSDL might also be helpful
------------------------------------------------------------------------
[2007-02-23 17:12:38] robin dot harvey at chaptereight dot com
Description:
------------
I've got a very simple soap service (written in Java/Tomcat/Axis) which
simply accepts and logs the XML of a soap request. I need to post
complex XML to the server (an XSL stylesheet) and I'm using SoapVar
with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
try to add more than one SoapVar object encoded in this way, PHP
segfaults. It's happy with 1 param as a SoapVar, and with both as
simple strings.
Reproduce code:
---------------
<?php
$s = new
SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
$data1 = <<<XML
<meta>
<properties>
<of>the transform go here!</of>
</properties>
</meta>
XML;
$data2 = <<<XML
<more>
<nice>Random content</nice>
<being>sent to the soap server</being>
</more>
XML;
$tdata = new SoapVar($data1, XSD_ANYXML);
$t = new SoapVar($data2, XSD_ANYXML);
$data = array('TransformData' => $tdata, 'Transform' => $t);
//$data = array('TransformData' => 'foo', 'Transform' => 'bar');
$s->examine($data);
?>
Expected result:
----------------
NULL. The service is 'In only'
Actual result:
--------------
robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
test-client-joe.php
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
iliaa@php.net Guest
-
dmitry@php.net #5
#40609 [Asn->Csd]: Segfaults when using more than one SoapVar in a request
ID: 40609
Updated by: [email]dmitry@php.net[/email]
Reported By: robin dot harvey at chaptereight dot com
-Status: Assigned
+Status: Closed
Bug Type: SOAP related
Operating System: Linux - Ubuntu
PHP Version: 5.2.1
Assigned To: dmitry
New Comment:
Fixed in CVS HEAD and PHP_5_2.
Thanks to Rob.
Previous Comments:
------------------------------------------------------------------------
[2007-02-24 14:08:31] robin dot harvey at chaptereight dot com
Hi,
I've uploaded the Soap service to an accessible site, and produced a
backtrace, as requested. I've not used dbg before, so please let me
know if i've done something wrong. I recompiled php with
--enable-debug: heres the configure line:
'./configure' \
'--with-apxs2=/usr/bin/apxs2' \
'--with-zlib' \
'--with-bz2' \
'--with-pdo-mysql' \
'--with-pdo-pgsql' \
'--with-xsl' \
'--with-pear' \
'--enable-soap' \
'--enable-ftp' \
'--with-gd' \
'--enable-mbstring' \
'--enable-sockets' \
'--with-mcrypt' \
'--enable-debug'
Here's a copy of the php script I'm using:
<?php
$xml1 = <<<XML
<this>
<might>be nice for a <while/> old chum</might>
</this>
XML;
$xml2 = <<<XML
<ok>
Run it through <dbg/> to see what's going on
</ok>
XML;
$c = new
SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl');
$sv1 = new SoapVar($xml1, XSD_ANYXML);
$sv2 = new SoapVar($xml2, XSD_ANYXML);
$c->update(array('symbol' => $sv1, 'price' => $sv2));
?>
....and the dbg session, with a backtrace...
(gdb) set args /home/robin/tmp/40609.php
(gdb) run
Starting program: /usr/local/bin/php /home/robin/tmp/40609.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 46912533505280 (LWP 23881)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912533505280 (LWP 23881)]
0x0000000000642c51 in encode_add_ns ()
(gdb) bt
#0 0x0000000000642c51 in encode_add_ns ()
#1 0x0000000000639c62 in to_zval_user ()
#2 0x0000000000639f42 in to_zval_user ()
#3 0x000000000063a71d in to_zval_user ()
#4 0x00000000006420d5 in sdl_guess_convert_xml ()
#5 0x0000000000634b37 in master_to_xml ()
#6 0x000000000062c8c6 in add_soap_fault ()
#7 0x000000000062c781 in add_soap_fault ()
#8 0x000000000062ba97 in add_soap_fault ()
#9 0x0000000000624448 in zim_SoapClient_SoapClient ()
#10 0x0000000000625f40 in zim_SoapClient___call ()
#11 0x00000000007fd2f8 in zend_call_function ()
#12 0x0000000000827112 in zend_call_method ()
#13 0x0000000000830aca in zend_std_call_user_call ()
#14 0x0000000000834ecd in execute ()
#15 0x0000000000835daa in execute ()
#16 0x0000000000834912 in execute ()
#17 0x000000000080c9e8 in zend_execute_scripts ()
#18 0x00000000007ae109 in php_execute_script ()
#19 0x000000000089170a in main ()
Many thanks,
--Robin
------------------------------------------------------------------------
[2007-02-23 17:48:16] [email]rrichards@php.net[/email]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
[url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
[url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
An accessible WSDL might also be helpful
------------------------------------------------------------------------
[2007-02-23 17:12:38] robin dot harvey at chaptereight dot com
Description:
------------
I've got a very simple soap service (written in Java/Tomcat/Axis) which
simply accepts and logs the XML of a soap request. I need to post
complex XML to the server (an XSL stylesheet) and I'm using SoapVar
with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
try to add more than one SoapVar object encoded in this way, PHP
segfaults. It's happy with 1 param as a SoapVar, and with both as
simple strings.
Reproduce code:
---------------
<?php
$s = new
SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
$data1 = <<<XML
<meta>
<properties>
<of>the transform go here!</of>
</properties>
</meta>
XML;
$data2 = <<<XML
<more>
<nice>Random content</nice>
<being>sent to the soap server</being>
</more>
XML;
$tdata = new SoapVar($data1, XSD_ANYXML);
$t = new SoapVar($data2, XSD_ANYXML);
$data = array('TransformData' => $tdata, 'Transform' => $t);
//$data = array('TransformData' => 'foo', 'Transform' => 'bar');
$s->examine($data);
?>
Expected result:
----------------
NULL. The service is 'In only'
Actual result:
--------------
robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
test-client-joe.php
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
dmitry@php.net Guest
-
robin dot harvey at chaptereight dot com #6
#40609 [Csd]: Segfaults when using more than one SoapVar in a request
ID: 40609
User updated by: robin dot harvey at chaptereight dot com
Reported By: robin dot harvey at chaptereight dot com
Status: Closed
Bug Type: SOAP related
Operating System: Linux - Ubuntu
PHP Version: 5.2.1
Assigned To: dmitry
New Comment:
Thanks for sorting this out so quickly guys - the fix works perfectly!
--Robin
Previous Comments:
------------------------------------------------------------------------
[2007-02-25 13:25:23] [email]dmitry@php.net[/email]
Fixed in CVS HEAD and PHP_5_2.
Thanks to Rob.
------------------------------------------------------------------------
[2007-02-24 14:08:31] robin dot harvey at chaptereight dot com
Hi,
I've uploaded the Soap service to an accessible site, and produced a
backtrace, as requested. I've not used dbg before, so please let me
know if i've done something wrong. I recompiled php with
--enable-debug: heres the configure line:
'./configure' \
'--with-apxs2=/usr/bin/apxs2' \
'--with-zlib' \
'--with-bz2' \
'--with-pdo-mysql' \
'--with-pdo-pgsql' \
'--with-xsl' \
'--with-pear' \
'--enable-soap' \
'--enable-ftp' \
'--with-gd' \
'--enable-mbstring' \
'--enable-sockets' \
'--with-mcrypt' \
'--enable-debug'
Here's a copy of the php script I'm using:
<?php
$xml1 = <<<XML
<this>
<might>be nice for a <while/> old chum</might>
</this>
XML;
$xml2 = <<<XML
<ok>
Run it through <dbg/> to see what's going on
</ok>
XML;
$c = new
SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl');
$sv1 = new SoapVar($xml1, XSD_ANYXML);
$sv2 = new SoapVar($xml2, XSD_ANYXML);
$c->update(array('symbol' => $sv1, 'price' => $sv2));
?>
....and the dbg session, with a backtrace...
(gdb) set args /home/robin/tmp/40609.php
(gdb) run
Starting program: /usr/local/bin/php /home/robin/tmp/40609.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 46912533505280 (LWP 23881)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912533505280 (LWP 23881)]
0x0000000000642c51 in encode_add_ns ()
(gdb) bt
#0 0x0000000000642c51 in encode_add_ns ()
#1 0x0000000000639c62 in to_zval_user ()
#2 0x0000000000639f42 in to_zval_user ()
#3 0x000000000063a71d in to_zval_user ()
#4 0x00000000006420d5 in sdl_guess_convert_xml ()
#5 0x0000000000634b37 in master_to_xml ()
#6 0x000000000062c8c6 in add_soap_fault ()
#7 0x000000000062c781 in add_soap_fault ()
#8 0x000000000062ba97 in add_soap_fault ()
#9 0x0000000000624448 in zim_SoapClient_SoapClient ()
#10 0x0000000000625f40 in zim_SoapClient___call ()
#11 0x00000000007fd2f8 in zend_call_function ()
#12 0x0000000000827112 in zend_call_method ()
#13 0x0000000000830aca in zend_std_call_user_call ()
#14 0x0000000000834ecd in execute ()
#15 0x0000000000835daa in execute ()
#16 0x0000000000834912 in execute ()
#17 0x000000000080c9e8 in zend_execute_scripts ()
#18 0x00000000007ae109 in php_execute_script ()
#19 0x000000000089170a in main ()
Many thanks,
--Robin
------------------------------------------------------------------------
[2007-02-23 17:48:16] [email]rrichards@php.net[/email]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
[url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
[url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
An accessible WSDL might also be helpful
------------------------------------------------------------------------
[2007-02-23 17:12:38] robin dot harvey at chaptereight dot com
Description:
------------
I've got a very simple soap service (written in Java/Tomcat/Axis) which
simply accepts and logs the XML of a soap request. I need to post
complex XML to the server (an XSL stylesheet) and I'm using SoapVar
with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
try to add more than one SoapVar object encoded in this way, PHP
segfaults. It's happy with 1 param as a SoapVar, and with both as
simple strings.
Reproduce code:
---------------
<?php
$s = new
SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
$data1 = <<<XML
<meta>
<properties>
<of>the transform go here!</of>
</properties>
</meta>
XML;
$data2 = <<<XML
<more>
<nice>Random content</nice>
<being>sent to the soap server</being>
</more>
XML;
$tdata = new SoapVar($data1, XSD_ANYXML);
$t = new SoapVar($data2, XSD_ANYXML);
$data = array('TransformData' => $tdata, 'Transform' => $t);
//$data = array('TransformData' => 'foo', 'Transform' => 'bar');
$s->examine($data);
?>
Expected result:
----------------
NULL. The service is 'In only'
Actual result:
--------------
robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
test-client-joe.php
Segmentation fault (core dumped)
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
robin dot harvey at chaptereight dot com Guest



Reply With Quote

