Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.5

Bug #18344 Doesn't work auto documentation
Submitted: 2011-03-08 17:08 UTC
From: ideje Assigned:
Status: Open Package: XML_RPC2 (version 1.0.8)
PHP Version: 5.2.6 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2011-03-08 17:08 UTC] ideje (Maksym Birintsev)
Description: ------------ Doesn't work auto documentation. Exception instead from there: public function readRequest() { if (!isset($this->input) && !isset($GLOBALS['HTTP_RAW_POST_DATA'])) throw new XML_RPC2_ConfigException('XML_RPC2_Server_Input_RawPo stData requested but PHP config does not show GLOBALS[\'HTTP_RAW_POST_DATA\'] as available'); if (!isset($this->input)) $this->input = $GLOBALS['HTTP_RAW_POST_DATA']; return $this->input; } Test script: --------------- just call API server URL with GET method Expected result: ---------------- HTML page with documentaion Actual result: -------------- Exception: <br /> <b>Fatal error</b>: Uncaught exception 'XML_RPC2_ConfigException' with message 'XML_RPC2_Server_Input_RawPostData requested but PHP config does not show GLOBALS['HTTP_RAW_POST_DATA'] as available' in /usr/share/php/XML/RPC2/Server/Input/RawPostData.php:77 Stack trace: #0 /usr/share/php/XML/RPC2/Server/Input/RawPostData.php(66) : XML_RPC2_Server_Input_RawPostData- >readRequest() #1 /usr/share/php/XML/RPC2/Backend/Xmlrpcext/Server.php(12 5): XML_RPC2_Server_Input_RawPostData->isEmpty() #2 /www/sprace/hrs/server/xmlrpc/api/index.php(34): XML_RPC2_Backend_Xmlrpcext_Server->handleCall() #3 {main} thrown in <b>/usr/share/php/XML/RPC2/Server/Input/RawPostData.php </b> on line <b>77</b><br />

Comments

 [2011-03-10 04:31 UTC] sergiosgc (Sérgio Carvalho)
You probably don't have raw post data enabled in your php config. Can you try passing an option to the server create method, with a PhpInput class? Something like: $server = XML_RPC2_Server::create('EchoServer', array('input' => new XML_RPC2_Server_Input_PhpInput())); so that it uses php://input instead of $GLOBALS['HTTP_RAW_POST_DATA']. Either that, or enable raw post data: http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
 [2011-03-10 04:31 UTC] sergiosgc (Sérgio Carvalho)
-Status: Open +Status: Feedback
 [2011-03-10 21:32 UTC] ideje (Maksym Birintsev)
when i try to use option 'input' => new XML_RPC2_Server_Input_PhpInput() XML-RPC server return HTML documentation for ALL requests (not just GET)
 [2018-07-20 19:07 UTC] ashnazg (Chuck Burgess)
-Status: Feedback +Status: Open