Bitcoin Forum

Economy => Service Discussion => Topic started by: sallasvve on February 02, 2015, 05:48:05 PM



Title: Block.io api error line 112
Post by: sallasvve on February 02, 2015, 05:48:05 PM

Notice: Trying to get property of non-object in C:\xampp\htdocs\block_io.php on line 112

Notice: Trying to get property of non-object in C:\xampp\htdocs\block_io.php on line 112

Notice: Trying to get property of non-object in C:\xampp\htdocs\block_io.php on line 112

Fatal error: Uncaught exception 'Exception' with message 'Failed: ' in C:\xampp\htdocs\block_io.php:112 Stack trace: #0 C:\xampp\htdocs\block_io.php(65): BlockIo->_request('get_new_address', Array) #1 C:\xampp\htdocs\game.php(12): BlockIo->__call('get_new_address', Array) #2 C:\xampp\htdocs\game.php(12): BlockIo->get_new_address(Array) #3 {main} thrown in C:\xampp\htdocs\block_io.php on line 112


how can i solve this?


Title: Re: Block.io api error line 112
Post by: coinableS on February 02, 2015, 06:32:03 PM
Did you set up your initialize section properly in game.php?

Code:
 $block_io = new BlockIo($apiKey, $pin, $version);

The sample php for generating a new address is a bit different than the way you are trying to do it.

Code:
 $newAddressInfo = $block_io->get_new_address(array('label' => 'shibe1'));


Title: Re: Block.io api error line 112
Post by: sallasvve on February 02, 2015, 07:32:23 PM
Did you set up your initialize section properly in game.php?

Code:
 $block_io = new BlockIo($apiKey, $pin, $version);

The sample php for generating a new address is a bit different than the way you are trying to do it.

Code:
 $newAddressInfo = $block_io->get_new_address(array('label' => 'shibe1'));
Code:
require_once 'block_io.php';

$apiKey = "my api";
$version = 2; // API version
$pin = "my secret pin";
$block_io = new BlockIo($apiKey, $pin, $version);
$newAddressInfo = $block_io->get_new_address(array('label' => 'shibe1'));

my php file


Title: Re: Block.io api error line 112
Post by: coinableS on February 02, 2015, 09:47:05 PM
What happened to your original code?  Previously you had "BlockIo->__call" based on the code I've seen so far BlockIo isn't a valid command. Maybe try "$block_io->__call"  etc

I'm not entirely familiar with block.io but it looks like it puts the address in an assoc array. Does it work when you try print it out?

Code:
echo $newAddressInfo['shibe1']; 


Title: Re: Block.io api error line 112
Post by: sallasvve on February 02, 2015, 10:48:19 PM
What happened to your original code?  Previously you had "BlockIo->__call" based on the code I've seen so far BlockIo isn't a valid command. Maybe try "$block_io->__call"  etc

I'm not entirely familiar with block.io but it looks like it puts the address in an assoc array. Does it work when you try print it out?

Code:
echo $newAddressInfo['shibe1']; 
thx for your helps. i solve. i just forget add SSL certificate to php.ini.