Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with xmlrpc_encode_request #1

Open
disvroian opened this issue Jan 13, 2015 · 3 comments
Open

Problem with xmlrpc_encode_request #1

disvroian opened this issue Jan 13, 2015 · 3 comments
Assignees

Comments

@disvroian
Copy link

Hello
After installing your extension i have the following error : Call to undefined function
HieuLe\WordpressXmlrpcClient\xmlrpc_encode_request() at line 823
if (!$this->_endPoint)
{ echo $this->_endPoint;exit();

        $this->_error = "Invalid endpoint " . json_encode(array('endpoint' => $this->_endPoint, 'username' => $this->_username, 'password' => $this->_password));
        $this->_logError();
        throw new \Exception($this->_error);
    }
    $this->_responseHeader = array();
    $this->_setXmlrpcType($params);
    $this->_request        = xmlrpc_encode_request($method, $params, array('encoding' => 'UTF-8', 'escaping' => 'markup'));
    $body                  = "";
    // Call sending event callbacks
    $callbacks = $this->_getCallback('sending');

Also when you look at php they do not recommend to use as it s still experimental. Do you have any tips to solve ? I use mamp php version 5.5.10 with apache
i tried to install /Applications/MAMP/bin/php/php5.5.10/bin/pear install XML_RPC successfully but still get my error.

@arm4b
Copy link

arm4b commented Jan 14, 2015

Can you double check if XMLRPC php extension is loaded?

Create file info.php and run it in your browser:

<?php
echo 'XMLRPC is ', extension_loaded('xmlrpc') ? 'loaded' : 'not loaded';

Without xmlrpc extension is not possible to run this plugin, since it's used to communicate between Wordpress and Yii2.

yii2-wordpress is wrapper for https://github.com/letrunghieu/wordpress-xmlrpc-client which requires xmlrpc php extension.

@arm4b
Copy link

arm4b commented Jan 14, 2015

So if it's not loaded, maybe check this discussion:
http://stackoverflow.com/questions/2031564/php-xmlrpc-extension-and-mamp

Also if XMLRPC is installed by pear and still not loaded, all you may need is to add

extension=xmlrpc.so

to your php.ini and restart mamp.

@ghost
Copy link

ghost commented Feb 26, 2015

Hi,
After installing extension im getting following error, and as per ur suggestion I have cross checked that XMLRPC is loaded in my localhost.
How to use this please explain asap.

PHP Fatal Error – yii\base\ErrorException

Class 'HieuLe\WordpressXmlrpcClient\WordpressClient' not found

  1. in D:\xampp\htdocs\yii2\vendor\monitorbacklinks\yii2-wordpress\Wordpress.php at line 207
    198199200201202203204205206207208209210211212213214215216 }
    if (!is_array($this->proxyConfig)) {
    throw new InvalidConfigException("Class "{$className}" requires "$proxyConfig" to be given in array format.");
    }
    if (!is_array($this->httpAuthConfig)) {
    throw new InvalidConfigException("Class "{$className}" requires "$httpAuthConfig" to be given in array format.");
    }
    // Create API client
    $this->_clientInstance = new WordpressClient($this->endpoint, $this->username, $this->password);
    $this->_clientInstance->setProxy($this->proxyConfig);
    $this->_clientInstance->setAuth($this->httpAuthConfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants