Bug #67427 [NEW]: SoapServer cannot handle large messages
| From: | brandt at docoloc dot de | Date: | Thu, 12 Jun 2014 16:54:40 +0000 |
| Subject: | Bug #67427 [NEW]: SoapServer cannot handle large messages | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-186162@lists.php.net to get a copy of this message | ||
From: brandt at docoloc dot de
Operating system: Linux, Debian jessie
PHP version: 5.6.0beta4
Package: SOAP related
Bug Type: Bug
Bug description:SoapServer cannot handle large messages
Description:
------------
Since php-5.6.0 SOAP messages bigger than about 9.9MB (I haven't tested
the exact value) are not processed correctly on the SoapServer. Instead
a SoapFault "Bad Request" is returned to the SoapClient and PHP produces
the following warning:
PHP Warning: SoapServer::handle(): php://input:2: parser error :
xmlSAX2Characters: huge text node in /var/www/soapapi/server.php on line
19
PHP Warning: SoapServer::handle():
bLklQQOUHbKlsdztx6mvbvj7b3knhnQ7gWsl1p9tcrJeRKD02YBLAZUfeGfVh3xVS2+Inhh7Yaf4J8Ky
in /var/www/soapapi/server.php on line 19
PHP Warning: SoapServer::handle():
^ in
/var/www/soapapi/server.php on line 19
With php-5.5.12 the exact same code works fine with such big SOAP
messages.
I guess libxml:XML_PARSE_HUGE needs to be set somewhere in order to
process such big messages.
Test script:
---------------
At http://viking.docoloc.de/soapapi.tgz you can
find a simple SOAP
example, consisting of a WSDL file, a server.php as well as a
client.php. This example allows uploading of files to the SOAP server
which will return the file size in bytes. When using this code you need
to set the correct hostname of the server in client.php as well as in
SoapAPI.wsdl.
When uploading a file up to a size of about 7MB everything works fine
and client.php writes the number of bytes as returned from the
SoapServer to stdout. But when uploading a file of 7.5MB (due to base64
encoding this produces a SOAP message of about 9.9MB) the SoapFault "Bad
Request" is produced.
--
Edit bug report at https://bugs.php.net/bug.php?id=67427&edit=1
--