Jump to content

Call to undefined function xmlrpc_encode_request()


kostakondras

Recommended Posts

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.