Reputation:
I am trying to use this php wrapper for multichain's json rpc api. I have this php file on a VPS with multichain installed: https://github.com/Kunstmaan/libphp-multichain in a php file. However I am not correctly integrating it and would appreciate any help!
<?php
require_once '../libphp-multichain/src/be/MultichainClient.php';
require_once '../libphp-multichain/src/be/MultichainHelper.php';
$client = MultichainClient("multichainrpc","{multichainpwd}",{host_address},{port},3);
$getinfo = $client->setDebug(true)->getInfo();
print_r($client);
print_r($getinfo);
?>
The error I see in apache error log is:
PHP Fatal error: require_once(): Failed opening required '../libphp-multichain/src/be/MultichainClient.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/new.php on line 3
Upvotes: 2
Views: 84
Reputation: 1124
It appears you are using the wrong path. Try this:
require_once '../libphp-multichain/src/be/kunstmaan/multichain/MultichainClient.php';
require_once '../libphp-multichain/src/be/kunstmaan/multichain/MultichainHelper.php';
Upvotes: 2