Bitcoin Forum
May 22, 2024, 03:52:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Block.io api error line 112  (Read 1410 times)
sallasvve (OP)
Full Member
***
Offline Offline

Activity: 280
Merit: 101


Proof-of-Stake Blockchain Network


View Profile
February 02, 2015, 05:48:05 PM
 #1


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?

coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
February 02, 2015, 06:32:03 PM
 #2

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'));

sallasvve (OP)
Full Member
***
Offline Offline

Activity: 280
Merit: 101


Proof-of-Stake Blockchain Network


View Profile
February 02, 2015, 07:32:23 PM
 #3

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

coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
February 02, 2015, 09:47:05 PM
 #4

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']; 

sallasvve (OP)
Full Member
***
Offline Offline

Activity: 280
Merit: 101


Proof-of-Stake Blockchain Network


View Profile
February 02, 2015, 10:48:19 PM
 #5

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.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!