[php-src] Issue #11253: SoapClient fails when input > 3070KB

From: Date: Wed, 17 May 2023 07:02:26 +0000
Subject: [php-src] Issue #11253: SoapClient fails when input > 3070KB
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244467@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/11253 Author: pk1234 ### Description We are sending PDF-files into our DMS with the following code: ```php $dms=new SoapClient(DMS_WDSL, ["encoding"=>"UTF-8"]); $r=$dms->Connect([ "ApplicationID" => DMS_AID, "ConnectionID" => DMS_CID, "UserName" => DMS_USER, "Password" => DMS_PASS, "EncodedPass" => false ]); $dok_id="D123456789"; $pdf_data=file_get_contents("/tmp/demo.pdf"); printf("%d bytes => %s\n", strlen($pdf_data), $dok_id); $r=$dms->CreateFileVersion([ "ObjectType" => "S", "ObjectID" => $dok_id, "FileBytes" => $pdf_data, "FileType" => "ftNative", "FileVersion" => 0, "FileExtension" => ".pdf", "DocumentName" => "Name", "VersionDescription" => "Desc" ]); ``` This fails $pdf_data has more than 3070 KB of data. Our DMS has problems to receive pdf-files of arbitrary length when we use a different SoapClient. I also used tcpdump to check what's going on. With large pdf-files not a single packet is leaving the machine that is running PHP SoapClient. With former PHP versions SoapClient would just fail without any error message. I Just installed PHP 8.2.6 an then the above code outputs: ``` 3153920 bytes => D123456789 PHP Fatal error: Uncaught SoapFault exception: [HTTP] Bad Request in /home/www/test2.php:184 Stack trace: #0 [internal function]: SoapClient->__doRequest() #1 /home/www/test2.php(184): SoapClient->__call() #2 {main} thrown in /home/www/test2.php on line 184 ``` Any ideas how I could debug this problem? /php-8.2.6/ext/soap has the following files: ``` CREDITS php_encoding.lo php_http.o php_schema.c php_sdl.dep php_xml.dep soap.lo config.m4 php_encoding.o php_packet_soap.c php_schema.dep php_sdl.h php_xml.h soap.o config.w32 php_http.c php_packet_soap.dep php_schema.h php_sdl.lo php_xml.lo soap.stub.php php_encoding.c php_http.dep php_packet_soap.h php_schema.lo php_sdl.o php_xml.o soap_arginfo.h php_encoding.dep php_http.h php_packet_soap.lo php_schema.o php_soap.h soap.c tests/ php_encoding.h php_http.lo php_packet_soap.o php_sdl.c php_xml.c soap.dep ``` Which one should I look into first? Peter ### PHP Version PHP 8.2.6 ### Operating System Slackware64 15.0, PHP compiled from source

« previous php.bugs (#244467) next »