kostakondras Posted January 24, 2011 Share Posted January 24, 2011 Currently, I am reading a book called PHP Web 2.0 Mashups and I have stumbled across an error on the second chapter which deals with XML-RPC protocol. The book has the following code which it uses to demonstrate the XML-RPC encoding functionality of PHP with the xmlrpc_encode_request function: <?php $singleVar = "Hello!"; $requestMessage = xmlrpc_encode_request('theRemoteCall', $singleVar); echo $requestMessage; ?> However when I load this page up on my local testing platform nothing is displayed. Upon checking the PHP error log I am confronted with this: [24-Jan-2011 07:56:40] PHP Fatal error: Call to undefined function xmlrpc_encode_request() in C:\wamp\www\jquery\collapsible.php on line 79 A couple of other points in relation to this: 1. I have the following lines in my PHP.ini file: ; Turn off normal error reporting and emit XML-RPC error XML ; http://php.net/xmlrpc-errors ;xmlrpc_errors = 0 ; An XML-RPC faultCode ;xmlrpc_error_number = 0 Does this not mean that xmlrpc functions are all ready installed on my WAMP server? I have download XML-RPC for PHP from http://phpxmlrpc.sourceforge.net/ (3.0.0 beta) and placed the files inside the extracted 'lib' folder into C:/PHP/includes and uncommented the PHP.ini line 'include_path = ".;c:\php\includes"'. However still, after restarting WAMP and refreshing the page it is still issuing a fatal error in PHP error log. Thank you for all your help in advance. Quote Link to comment https://forums.phpfreaks.com/topic/225472-call-to-undefined-function-xmlrpc_encode_request/ Share on other sites More sharing options...
trq Posted January 24, 2011 Share Posted January 24, 2011 Check phpinfo to see if xmlrpc is enabled (it likely isn't). If not, you will need to enable it within the extensions section of your php.ini then restart Apache. Quote Link to comment https://forums.phpfreaks.com/topic/225472-call-to-undefined-function-xmlrpc_encode_request/#findComment-1164292 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.