ID: 31078 User updated by: ivan dot chollet at lynanda dot com Reported By: ivan dot chollet at lynanda dot com -Status: Feedback +Status: Open Bug Type: SOAP related Operating System: freebsd 5.3 PHP Version: 5.0.2 Assigned To: dmitry New Comment:
it's seems like the bug is fixed. Congratulations ! however I wasn't able to install php 5.1 the "easy way". I had much work to do after having configured with --enable-soap to get things work and I could not use the code above because the function soapclient doesn't work well with these sources. Regards, Ivan Previous Comments: ------------------------------------------------------------------------ [2005-02-28 21:16:50] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2004-12-14 18:26:27] ivan dot chollet at lynanda dot com The problem is well addressed by the way you told me. It works well. The point is that your Soap extension consumes a large amount of memory. In fact I set the memory limit to 64M to address the problem raised by the code above. 64M is much for a single php process. But if you change the upper bound to 3 million instead of 2 then it does not work anymore, so you would need memory_limit like 128M which is not reasonable. The code above is a big variant of real world server code that should send a 800K string filled with db stuff. The server can send this 800K string through Soap only if memory_limit>256M. So at the moment there is only a solution to make the service work : use sockets or switch on asp.net Please tell me wether you plan to address it or not. ivan chollet ------------------------------------------------------------------------ [2004-12-14 13:31:35] [EMAIL PROTECTED] Try to incrise "memory_limit" in your php.ini. Your soap server dies because of memory overflow and doesn't send HTTP response. This is not a bug. ------------------------------------------------------------------------ [2004-12-14 02:43:17] ivan dot chollet at lynanda dot com if someone wants a wsdl file that works with then just ask me (basically there is one function returning a string a taking no argument so very simple) ------------------------------------------------------------------------ [2004-12-14 02:28:06] ivan dot chollet at lynanda dot com Description: ------------ When the result of a web service function is a big string, PHP sends the error : Uncaught SoapFault exception: "[HTTP] Error fetching http headers in (/usr/local/ etc...)" The code used to make it crash is very simple. Reproduce code: --------------- on the server, let call our file "soap-server.php" with the code : <?php function crashfun{ for($i=0,$i<=2000000,$i++){ $result.='x'; } return $result; } $server= new soapserver('somewsdlfile.wsdl') $server->addfunction('crashfun'); $server->handle(); ?> on the client side, let invoke the web service in "soap-client.php" : <?php $client=new soapclient("somewsdlfile.wsdl"); print($client->crashfun()); ?> put all the files in the same directory Expected result: ---------------- when you call on the command line "php -f soap-client.php > shit | vi shit", you see a beautiful file filled with "x"s. set the upper bound for the for loop in the code to 100 000 and everything works well set it to 2 000 000 and it crashes. sorry i didn't take the time to check the exact limit for this upper bound and it's about 1 000 000 Actual result: -------------- the actual result is the bug mentionned in "description" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31078&edit=1