I'm able to connect to bitcoind using my command line and the process is running with the appropriate port but when I try to run it through XAMPP after using the JSON-RPC library (I used the PHP developer intro for the code) it's giving me the following error, and I don't know why:
Warning: fopen(): Failed to enable crypto in /opt/lampp/htdocs/bitcoins/jsonRPCClient.php on line 132
Warning: fopen(https://[email protected]:8332/): failed to open stream: operation failed in /opt/lampp/htdocs/bitcoins/jsonRPCClient.php on line 132
Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to https://user:password
@127.0.0.1:8332/' in /opt/lampp/htdocs/bitcoins/jsonRPCClient.php:140
Stack trace:
#0 /opt/lampp/htdocs/bitcoins/testServer.php(7): jsonRPCClient->__call('getinfo', Array)
#1 /opt/lampp/htdocs/bitcoins/testServer.php(7): jsonRPCClient->getinfo()
#2 {main}
thrown in /opt/lampp/htdocs/bitcoins/jsonRPCClient.php on line 140
The code is the following: (we tried toggling between http and https and it's still not working)
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('https://user:[email protected]:8332/');
echo "<pre>\n";
print_r($bitcoin->getinfo());
echo "</pre>";