Bug #67427 [Opn]: SoapServer cannot handle large messages

From: Date: Tue, 25 Nov 2014 10:04:46 +0000
Subject: Bug #67427 [Opn]: SoapServer cannot handle large messages
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188785@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67427&edit=1 ID: 67427 User updated by: brandt at docoloc dot de Reported by: brandt at docoloc dot de Summary: SoapServer cannot handle large messages Status: Open Type: Bug Package: SOAP related Operating System: Linux, Debian jessie -PHP Version: 5.6.0beta4 +PHP Version: 5.6.2 Block user comment: N Private report: N New Comment: The given patch solves the problem by setting libxml:XML_PARSE_HUGE in ext/soap/php_xml.c Previous Comments: ------------------------------------------------------------------------ [2014-06-12 16:54:38] brandt at docoloc dot de 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 this bug report at https://bugs.php.net/bug.php?id=67427&edit=1

« previous php.bugs (#188785) next »