403 with rpcallowip=0.0.0.0/0

+2 votes
Thanks for your response. I actually have tried that several times and still get the error - do you have any other ideas?

I went with the php wrapper from your page again and receive this error

> PHP Fatal error:  Uncaught exception 'JsonRPC\\AccessDeniedException' with message 'Response: HTTP/1.1 403 Forbidden' in /var/www/html/vendor/fguillot/json-rpc/src/JsonRPC/Client.php:301\nStack trace:\n#0 /var/www/html/vendor/fguillot/json-rpc/src/JsonRPC/Client.php(323): JsonRPC\\Client->handleHttpErrors(Array)\n#1 /var/www/html/vendor/fguillot/json-rpc/src/JsonRPC/Client.php(201): JsonRPC\\Client->doRequest(Array)\n#2 /var/www/html/vendor/kunstmaan/libphp-multichain/src/be/kunstmaan/multichain/MultichainClient.php(113): JsonRPC\\Client->execute('getnewaddress', Array)\n#3 /var/www/html/new.php(13): be\\kunstmaan\\multichain\\MultichainClient->getNewAddress()\n#4 {main}\n  thrown in /var/www/html/vendor/fguillot/json-rpc/src/JsonRPC/Client.php on line 301

 

my multichain.conf file is:

rpcuser=multichainrpc
rpcpassword={PW}
rpcallowip=0.0.0.0/0
rpcport=4286

Code is:
<?php

require_once 'vendor/autoload.php';

use be\kunstmaan\multichain\MultichainClient;
use be\kunstmaan\multichain\MultichainHelper;

$client = new MultichainClient("http://107.170.46.125:4286", "multichainrpc","{PW}");
$address = $client->setDebug(true)->getNewAddress();

print_r($address);
?>
asked Jun 14, 2016 by anonymous

1 Answer

+1 vote

Is it possible you have a firewall on that server which is preventing the incoming requests on port 4286? You can read about and use iptables to check into this.

answered Jun 15, 2016 by MultiChain
...