View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014157 | mantisbt | api soap | public | 2012-04-16 08:07 | 2015-07-27 16:16 |
Reporter | chrstph | Assigned To | rombert | ||
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | PHP 5.4 | ||||
Product Version | 1.2.10 | ||||
Target Version | 1.2.13 | Fixed in Version | 1.2.13 | ||
Summary | 0014157: Array to string conversion error on soap request with PHP 5.4 | ||||
Description | I try to complete my installation of Mylyn 3.6 with Mantis 1.2.10. I check the service "mc_projects_get_user_accessible" via the URL mantis/api/soap/mantisconnect.php. When I send this envelope: <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:man="http://futureware.biz/mantisconnect"> I receive this error: I'm trying to find into the mantis configuration if I missed something but in case, I report a possible bug ? The web client and the server are running on the same host, PHP seems running with a memory limit set to 128M. | ||||
Steps To Reproduce | SOAPUI4, call mc_projects_get_user_accessible with a valid user/password. | ||||
Tags | No tags attached. | ||||
related to | 0014871 | closed | rombert | mantisbt | Add support for the built-in soap extension in addition to nusoap |
related to | 0015721 | closed | grangeway | mantisbt | Functionality to consider porting to master-2.0.x |
has duplicate | 0014290 | closed | vboctor | MantisTouch | Cannot Login to Mantis Touch |
has duplicate | 0015435 | closed | rombert | mantisbt | mylyn matins intergration fail |
has duplicate | 0015687 | closed | rombert | mantisbt | Plugin is unable do download list of ticktes due to server error. |
has duplicate | 0020545 | closed | rombert | mantisbt | Not able to connect from Jenkin and SOAP |
related to | 0014744 | closed | dregad | mantisbt | Unicode characters in text field prevent bug display |
related to | 0016344 | closed | dregad | mantisbt | Array to string conversion on SOAP request with PHP 5.5.3 |
I don't see anything obviously wrong in the stack trace so I'm not sure what triggered the notice. What version of PHP are you running? |
|
Windows: XP (localhost: web client, soapui and server) |
|
This might be an PHP 5.4.0 issue . Can you try with PHP 5.3.x ? |
|
Hi, It's working with 5.3.10, didn't tried with 5.4.1RC2 Thanks for your time. |
|
If the problem is PHP 5.4 we should fix this in the near future, but it's not such high priority. |
|
Hi, I got the same errors when trying on most of the methods, e.g. 'mc_enum_project_status' on PHP 5.3.2. |
|
(In reply to comment 0014157:0031910)
Can you confirm that it's 5.3.2 ? I've been running the SOAP API on PHP 5.3.x for months with no issues. |
|
@rombert, I've marked 0014290 as a duplicate of this one. The user had issues with 5.4 that got fixed when downgrading to an older PHP version. Any idea why we are having this issue? Thoughts about a fix? |
|
I'm not sure where to start ; I don't have a php 5.4 box for testing but I might get around to it next week. A good discussion of the technical issue can be found at https://github.com/symfony/symfony/issues/2585 . |
|
The fix for bug 0014341 should prevent system notices from halting SOAP call execution. Can you retry with 1.2.11 on PHP 5.4? |
|
Hi: I got hit with this problem when Arch Linux upgraded to PHP 2.4. Being that a downgrade was not an option, I decided to go to the bottom of it. The problem seems to be on the debug statement when it tries to convert an array to a string around line 6139 in serializeType in nusoap.php. The debug statement is in comments in the note, because is the one causing the error problems. Most likely it should be resolved with an application of implode on the right variable type. But being that I do not need to run debug, a comment on the statement will do it for me. Code included: $rows = sizeof($value); //if (strpos($typeDef['arrayType'], ':') ) { if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { ... |
|
Great, thanks for letting us know. I think we should look into patching this ourselves before nusoap comes up with a new release. |
|
I can confirm the problem (PHP 5.4.6 under FreeBSD) and, most important, I can confirm the fix. The exact line for mantis 1.2.11 is 6132: removing the debug statement resolved all the problems. |
|
yes, it's php 5.4.x issue. |
|
Rather than take the burden of maintaining a fork of nusoap, I plan to 'fix' this by allowing you to use the php5 soap extension instead of nusoap. Would such an approach work for you? |
|
The next version supports using the php5 soap extension if it is present, and by definition this supports PHP 5.4. |
|
I found bug related to this problem, at mc_api.php /**
|
|
Thanks for reporting this error! I don't think we can apply your fix, as nusoap/the soap extension already do this encoding and it's not effective for our problem. But I'll try to make the regex not reomve russian letters. |
|
Hey guys, I took me a while to research why the regex was not working, but I think I have finally got it, thanks to [1] - it appears that PHP / PCRE does not recognize the \xNNNN syntax, you have to use the \x{NNNN} constructs all the time Could you please try with the following regex: [^\x9\xA\xD\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]+/u Let me know how it goes. |
|
The fix works fine for my test ( Russian, Mandarin Chinese ). Thanks! |
|
Rombert: Sorry for the delay, using the PHP5 soap extension rather than nusoap.php is fine with me. I did not see any objections and the issue is marked as fixed. I'll look forward to it on the next release. :) Thanks. Luis |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master 7ae2d9ae 2012-11-15 15:01 Details Diff |
Fix replacing of invalid XML characters Fixes 0014157: Array to string conversion error on soap request with PHP 5.4 |
Affected Issues 0014157 |
|
mod - api/soap/mc_api.php | Diff File | ||
MantisBT: master-1.2.x 500a0fce 2012-11-15 15:01 Details Diff |
Fix replacing of invalid XML characters Fixes 0014157: Array to string conversion error on soap request with PHP 5.4 |
Affected Issues 0014157 |
|
mod - api/soap/mc_api.php | Diff File |