View Issue Details

IDProjectCategoryView StatusLast Update
0016344mantisbtapi soappublic2013-09-16 02:36
Reporterbrent_s Assigned Todregad  
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformXen Paravirt - X86_64OSArch LinuxOS Versionn/a
Product Version1.2.15 
Summary0016344: Array to string conversion on SOAP request with PHP 5.5.3
Description

When using the supybot-mantis plugin (a plugin for the IRC bot that retrieves bug information from MantisBT), an Array to String conversion error occurs in the API.

Note: some information from the following has been censored.

2013/08/31 23:59:54 [error] 25563#0: *9824 FastCGI sent in stderr: "PHP message: [mantisconnect.php] Error Type: SYSTEM NOTICE,
Error Description: Array to string conversion
Stack Trace:
nusoap.php L6335 serializeType(<string>'notes', <string>'http://futureware.biz/mantisconnect:IssueNoteDataArray', <Array> { [0] => <Array> { ['id'] => '4', ['reporter'] => <Array> { ['id'] => '2', ['name'] => 'bts', ['real_name'] => 'brent s.', ['email'] => 'bts@REDACED.RDCTD' }, ['date_submitted'] => '2013-08-23T00:52:25-04:00', ['last_modified'] => '2013-08-23T00:52:48-04:00', ['text'] => '"-can i configure karma plugin to silently grab ++\'s and --\'s instead of being prefixed?"

this is done.

"-16:56:23 < nick1> need the infobot plugin too
16:56:33 < nick2> yah, need to config that as well
16:56:42 < nick1> for the \'is\' and reply stuff"

this is done.

pending items:

-populate LART db
-RSS feeds for blogs and ML
-priv-managing, ops for bot, etc.

', ['view_state'] => <Array> { ['id'] => '10', ['name'] => 'public' }, ['time_tracking'] => 0, ['note_type'] =>" while reading response header from upstream, client: 127.0.0.1, server: bugs.redacted.rdctd, request: "POST /api/soap/mantisconnect.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "bugs.localhost"
2013/09/01 00:12:22 [error] 25563#0: 9999 FastCGI sent in stderr: "PHP message: [mantisconnect.php] Error Type: SYSTEM NOTICE,
Error Description: Array to string conversion
Stack Trace:
nusoap.php L6335 serializeType(<string>'relationships', <string>'http://futureware.biz/mantisconnect:RelationshipDataArray', <Array> { [0] => <Array> { ['id'] => '3', ['type'] => <Array> { ['id'] => '2', ['name'] => 'parent of' }, ['target_id'] => '8' }, [1] => <Array> { ['id'] => '4', ['type'] => <Array> { ['id'] => '2', ['name'] => 'parent of' }, ['target_id'] => '5' } }, <string>'encoded', <boolean>false, <boolean>true)
nusoap.php L6083 serializeComplexTypeElements(<Array> { ['name'] => 'IssueData', ['typeClass'] => 'complexType', ['phpType'] => 'struct', ['simpleContent'] => 'false', ['compositor'] => 'all', ['elements'] => <Array> { ['id'] => <Array> { ['name'] => 'id', ['type'] => 'http://www.w3.org/2001/XMLSchema:integer', ['minOccurs'] => '0', ['form'] => 'unqualified' }, ['view_state'] => <Array> { ['name'] => 'view_state', ['type'] => 'http://futureware.biz/mantisconnect:ObjectR" while reading response header from upstream, client: 127.0.0.1, server: bugs.redacted.rdctd, request: "POST /api/soap/mantisconnect.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "bugs.localhost"
2013/09/01 01:05:23 [error] 25563#0:
10654 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 71.230.176.221, server: bugs.redacted.rdctd, request: "GET /bugs/api/soap/mantisconnect.php?wsdl HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "bugs.redacted.rdctd"

HTTP stream of failed request:
POST /api/soap/mantisconnect.php HTTP/1.0
Host: bugs.localhost
User-agent: SOAPpy 0.12.5 (pywebsvcs.sf.net)
Content-type: text/xml; charset=UTF-8
Content-length: 671
SOAPAction: "mc_issue_get"

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"

<SOAP-ENV:Body>
<ns1:mc_issue_get xmlns:ns1="http://futureware.biz/mantisconnect" SOAP-ENC:root="1">
<username xsi:type="xsd:string">REDACTED</username>
<password xsi:type="xsd:string">REDACTED</password>
<issue_id xsi:type="xsd:integer">1</issue_id>
</ns1:mc_issue_get>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP/1.1 500 Internal Server Error
Date: Sun, 01 Sep 2013 03:44:26 GMT
Content-Type: text/xml; charset=UTF-8
Content-Length: 692
Connection: close
X-Powered-By: PHP/5.5.3
Set-Cookie: PHPSESSID=REDACTED; path=/; HttpOnly
Cache-Control: private, max-age=10800, pre-check=10800
Last-Modified: Tue, 20 Aug 2013 02:19:13 GMT
Server: NuSOAP Server v0.9.5
X-SOAP-Server: NuSOAP/0.9.5 (1.123)

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">Server</faultcode><faultactor xsi:type="xsd:string"></faultactor><faultstring xsi:type="xsd:string">Error Type: SYSTEM NOTICE,
E

And from a successful fetch:

POST /api/soap/mantisconnect.php HTTP/1.0
Host: bugs.localhost
User-agent: SOAPpy 0.12.5 (pywebsvcs.sf.net)
Content-type: text/xml; charset=UTF-8
Content-length: 672
Cookie: PHPSESSID=REDACTED; $Path=/
SOAPAction: "mc_issue_get"

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"

<SOAP-ENV:Body>
<ns1:mc_issue_get xmlns:ns1="http://futureware.biz/mantisconnect" SOAP-ENC:root="1">
<username xsi:type="xsd:string">REDACTED</username>
<password xsi:type="xsd:string">REDACTED</password>
<issue_id xsi:type="xsd:integer">15</issue_id>
</ns1:mc_issue_get>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP/1.1 200 OK
Date: Sun, 01 Sep 2013 03:44:21 GMT
Content-Type: text/xml; charset=UTF-8
Content-Length: 3369
Connection: close
X-Powered-By: PHP/5.5.3
Cache-Control: private, max-age=10800, pre-check=10800
Last-Modified: Tue, 20 Aug 2013 02:19:13 GMT
Server: NuSOAP Server v0.9.5
X-SOAP-Server: NuSOAP/0.9.5 (1.123)

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://futureware.biz/mantisconnect"><SOAP-ENV:Body><ns1:mc_issue_getResponse xmlns:ns1="http://futureware.biz/mantisconnect"><return xsi:type="tns:IssueData"><id xsi:type="xsd:integer">15</id><view_state xmlns="" xsi:type="tns:ObjectRef"><id xsi:type="xsd:integer">10</id><na...

This only occurs with certain bugs; other bug IDs it works fine with. I suspect it may be in the parsing of the ticket as I can see no real difference in tickets that work and do not work otherwise.

May be related to bug 0014157 et. al. as the same symptoms appear to occur.

TagsNo tags attached.

Relationships

related to 0014157 closedrombert Array to string conversion error on soap request with PHP 5.4 

Activities

dregad

dregad

2013-09-01 05:48

developer   ~0037963

Well if it's indeed related to 0014157, did you try switching to PHP5 soap extension instead of using nusoap ?

brent_s

brent_s

2013-09-01 12:36

reporter   ~0037967

my apologies! i indeed switched to the soap extension and it's working beautifully now. please feel free to close this out; PEBKAC. ;)