Bitcoin Forum
December 08, 2016, 08:12:24 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoin-php [Odd problem]  (Read 1083 times)
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 08, 2011, 11:49:47 AM
 #1

So I have a wierd error my code is this
Code:
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost, 8332);

This part works and when it print_r($bitcoinController);
I see that it outputs and array like this
Quote
BitcoinClient Object ( [no_multicall] => 1 [return_type] => jsonrpcvals [path] => / [server] => 316.28.27.298 [port] => 8332 [method] => http [errno] => [errstr] => [debug] => 0 [username] => xxxxx [password] => xxxxx [authtype] => 1 [cert] => [certpass] => [cacert] => [cacertdir] => [key] => [keypass] => [verifypeer] => 1 [verifyhost] => 0 [proxy] => [proxyport] => 0 [proxy_user] => [proxy_pass] => [proxy_authtype] => 1 [cookies] => Array ( ) [extracurlopts] => Array ( ) [accepted_compression] => Array (
  • => gzip [1] => deflate ) [request_compression] => [xmlrpc_curl_handle] => [keepalive] => 1 [accepted_charset_encodings] => Array (
  • => UTF-8 [1] => ISO-8859-1 [2] => US-ASCII ) [request_charset_encoding] => [user_agent] => XML-RPC for PHP 3.0.0.beta )
The above array looks like it is either connecting successfully, or it just reads the config to get all the info and stops(Can someone clear this up that the array means its connecting, scince isn't bitcoin-php is supposed to fail on bad connection?)

anyways, when it try{}catch{} it and try to output the exception i get no errors the script just skips over it basically.

I can't even do a simple $bitcoinController->getDifficulty(); after connecting it just dosn't out put anything
I have php errors set to E_ERROR | E_WARNING | E_PARSE | E_NOTICE just so I can pick up on anything... what is wrong?
1481227944
Hero Member
*
Offline Offline

Posts: 1481227944

View Profile Personal Message (Offline)

Ignore
1481227944
Reply with quote  #2

1481227944
Report to moderator
1481227944
Hero Member
*
Offline Offline

Posts: 1481227944

View Profile Personal Message (Offline)

Ignore
1481227944
Reply with quote  #2

1481227944
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481227944
Hero Member
*
Offline Offline

Posts: 1481227944

View Profile Personal Message (Offline)

Ignore
1481227944
Reply with quote  #2

1481227944
Report to moderator
1481227944
Hero Member
*
Offline Offline

Posts: 1481227944

View Profile Personal Message (Offline)

Ignore
1481227944
Reply with quote  #2

1481227944
Report to moderator
1481227944
Hero Member
*
Offline Offline

Posts: 1481227944

View Profile Personal Message (Offline)

Ignore
1481227944
Reply with quote  #2

1481227944
Report to moderator
joepie91
Sr. Member
****
Offline Offline

Activity: 294


View Profile
July 08, 2011, 12:05:31 PM
 #2

So I have a wierd error my code is this
Code:
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost, 8332);

This part works and when it print_r($bitcoinController);
I see that it outputs and array like this
Quote
BitcoinClient Object ( [no_multicall] => 1 [return_type] => jsonrpcvals [path] => / [server] => 316.28.27.298 [port] => 8332 [method] => http [errno] => [errstr] => [debug] => 0 [username] => xxxxx [password] => xxxxx [authtype] => 1 [cert] => [certpass] => [cacert] => [cacertdir] => [key] => [keypass] => [verifypeer] => 1 [verifyhost] => 0 [proxy] => [proxyport] => 0 [proxy_user] => [proxy_pass] => [proxy_authtype] => 1 [cookies] => Array ( ) [extracurlopts] => Array ( ) [accepted_compression] => Array (
  • => gzip [1] => deflate ) [request_compression] => [xmlrpc_curl_handle] => [keepalive] => 1 [accepted_charset_encodings] => Array (
  • => UTF-8 [1] => ISO-8859-1 [2] => US-ASCII ) [request_charset_encoding] => [user_agent] => XML-RPC for PHP 3.0.0.beta )
The above array looks like it is either connecting successfully, or it just reads the config to get all the info and stops(Can someone clear this up that the array means its connecting, scince isn't bitcoin-php is supposed to fail on bad connection?)

anyways, when it try{}catch{} it and try to output the exception i get no errors the script just skips over it basically.

I can't even do a simple $bitcoinController->getDifficulty(); after connecting it just dosn't out put anything
I have php errors set to E_ERROR | E_WARNING | E_PARSE | E_NOTICE just so I can pick up on anything... what is wrong?
316.28.27.298 does not look like a valid IP to me.

Like my post(s)? 12TSXLa5Tu6ag4PNYCwKKSiZsaSCpAjzpu Smiley
Quote from: hawks5999
I just can't wait for fall/winter. My furnace never generated money for me before. I'll keep mining until my furnace is more profitable.
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 08, 2011, 12:18:26 PM
 #3

So I have a wierd error my code is this
Code:
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost, 8332);

This part works and when it print_r($bitcoinController);
I see that it outputs and array like this
Quote
BitcoinClient Object ( [no_multicall] => 1 [return_type] => jsonrpcvals [path] => / [server] => 316.28.27.298 [port] => 8332 [method] => http [errno] => [errstr] => [debug] => 0 [username] => xxxxx [password] => xxxxx [authtype] => 1 [cert] => [certpass] => [cacert] => [cacertdir] => [key] => [keypass] => [verifypeer] => 1 [verifyhost] => 0 [proxy] => [proxyport] => 0 [proxy_user] => [proxy_pass] => [proxy_authtype] => 1 [cookies] => Array ( ) [extracurlopts] => Array ( ) [accepted_compression] => Array (
  • => gzip [1] => deflate ) [request_compression] => [xmlrpc_curl_handle] => [keepalive] => 1 [accepted_charset_encodings] => Array (
  • => UTF-8 [1] => ISO-8859-1 [2] => US-ASCII ) [request_charset_encoding] => [user_agent] => XML-RPC for PHP 3.0.0.beta )
The above array looks like it is either connecting successfully, or it just reads the config to get all the info and stops(Can someone clear this up that the array means its connecting, scince isn't bitcoin-php is supposed to fail on bad connection?)

anyways, when it try{}catch{} it and try to output the exception i get no errors the script just skips over it basically.

I can't even do a simple $bitcoinController->getDifficulty(); after connecting it just dosn't out put anything
I have php errors set to E_ERROR | E_WARNING | E_PARSE | E_NOTICE just so I can pick up on anything... what is wrong?
316.28.27.298 does not look like a valid IP to me.

It sure isn't my server isn't secure enough yet for me to realease it. But I did copy and paste it into the config files and they do match correctly. I can connecto through pushpool and start mining just fine. Its just that through php (maybe user permissions?) it dosn't want to connect to it. I also tried setting up a cross server mysql for remote server and that worked just fine with out opening an ports. So in other words I was able to connect from my webhosting->to VPS database succesfully but the bitcoin server wasn't connecting, so I tried doing this locally instead of a remote server and the local server reports no errors yet when I tried connected remotly it said BitcoinClient
  • Error Conneciton(111) excpetion,etc, etc, blah, blah.

I know its got to be a simple problem, I can taste it.
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 08, 2011, 12:28:02 PM
 #4

Now that i think about it my rpcip=127.0.0.1
why do you think it is saying server => external ip address here?
joepie91
Sr. Member
****
Offline Offline

Activity: 294


View Profile
July 08, 2011, 12:31:11 PM
 #5

So I have a wierd error my code is this
Code:
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost, 8332);

This part works and when it print_r($bitcoinController);
I see that it outputs and array like this
Quote
BitcoinClient Object ( [no_multicall] => 1 [return_type] => jsonrpcvals [path] => / [server] => 316.28.27.298 [port] => 8332 [method] => http [errno] => [errstr] => [debug] => 0 [username] => xxxxx [password] => xxxxx [authtype] => 1 [cert] => [certpass] => [cacert] => [cacertdir] => [key] => [keypass] => [verifypeer] => 1 [verifyhost] => 0 [proxy] => [proxyport] => 0 [proxy_user] => [proxy_pass] => [proxy_authtype] => 1 [cookies] => Array ( ) [extracurlopts] => Array ( ) [accepted_compression] => Array (
  • => gzip [1] => deflate ) [request_compression] => [xmlrpc_curl_handle] => [keepalive] => 1 [accepted_charset_encodings] => Array (
  • => UTF-8 [1] => ISO-8859-1 [2] => US-ASCII ) [request_charset_encoding] => [user_agent] => XML-RPC for PHP 3.0.0.beta )
The above array looks like it is either connecting successfully, or it just reads the config to get all the info and stops(Can someone clear this up that the array means its connecting, scince isn't bitcoin-php is supposed to fail on bad connection?)

anyways, when it try{}catch{} it and try to output the exception i get no errors the script just skips over it basically.

I can't even do a simple $bitcoinController->getDifficulty(); after connecting it just dosn't out put anything
I have php errors set to E_ERROR | E_WARNING | E_PARSE | E_NOTICE just so I can pick up on anything... what is wrong?
316.28.27.298 does not look like a valid IP to me.

It sure isn't my server isn't secure enough yet for me to realease it. But I did copy and paste it into the config files and they do match correctly. I can connecto through pushpool and start mining just fine. Its just that through php (maybe user permissions?) it dosn't want to connect to it. I also tried setting up a cross server mysql for remote server and that worked just fine with out opening an ports. So in other words I was able to connect from my webhosting->to VPS database succesfully but the bitcoin server wasn't connecting, so I tried doing this locally instead of a remote server and the local server reports no errors yet when I tried connected remotly it said BitcoinClient
  • Error Conneciton(111) excpetion,etc, etc, blah, blah.

I know its got to be a simple problem, I can taste it.
Ahhh... I thought you may have typoed on the IP (start with a 3 instead of a 2) or something. Anyhow, I don't have any experience with this kind of thing yet.. so I'm not sure what the problem is. Have you double checked all other configuration options?

Like my post(s)? 12TSXLa5Tu6ag4PNYCwKKSiZsaSCpAjzpu Smiley
Quote from: hawks5999
I just can't wait for fall/winter. My furnace never generated money for me before. I'll keep mining until my furnace is more profitable.
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 08, 2011, 12:32:54 PM
 #6

Yeah I'm starting to lose sleep over this, I got it succesfully working on my local computer, and my ex-vps(is that a word?) and on my new vps it is supposed to be Anti-DDoS so maybe they are blocking the port who knows
So I have a wierd error my code is this
Code:
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost, 8332);

This part works and when it print_r($bitcoinController);
I see that it outputs and array like this
Quote
BitcoinClient Object ( [no_multicall] => 1 [return_type] => jsonrpcvals [path] => / [server] => 316.28.27.298 [port] => 8332 [method] => http [errno] => [errstr] => [debug] => 0 [username] => xxxxx [password] => xxxxx [authtype] => 1 [cert] => [certpass] => [cacert] => [cacertdir] => [key] => [keypass] => [verifypeer] => 1 [verifyhost] => 0 [proxy] => [proxyport] => 0 [proxy_user] => [proxy_pass] => [proxy_authtype] => 1 [cookies] => Array ( ) [extracurlopts] => Array ( ) [accepted_compression] => Array (
  • => gzip [1] => deflate ) [request_compression] => [xmlrpc_curl_handle] => [keepalive] => 1 [accepted_charset_encodings] => Array (
  • => UTF-8 [1] => ISO-8859-1 [2] => US-ASCII ) [request_charset_encoding] => [user_agent] => XML-RPC for PHP 3.0.0.beta )
The above array looks like it is either connecting successfully, or it just reads the config to get all the info and stops(Can someone clear this up that the array means its connecting, scince isn't bitcoin-php is supposed to fail on bad connection?)

anyways, when it try{}catch{} it and try to output the exception i get no errors the script just skips over it basically.

I can't even do a simple $bitcoinController->getDifficulty(); after connecting it just dosn't out put anything
I have php errors set to E_ERROR | E_WARNING | E_PARSE | E_NOTICE just so I can pick up on anything... what is wrong?
316.28.27.298 does not look like a valid IP to me.

It sure isn't my server isn't secure enough yet for me to realease it. But I did copy and paste it into the config files and they do match correctly. I can connecto through pushpool and start mining just fine. Its just that through php (maybe user permissions?) it dosn't want to connect to it. I also tried setting up a cross server mysql for remote server and that worked just fine with out opening an ports. So in other words I was able to connect from my webhosting->to VPS database succesfully but the bitcoin server wasn't connecting, so I tried doing this locally instead of a remote server and the local server reports no errors yet when I tried connected remotly it said BitcoinClient
  • Error Conneciton(111) excpetion,etc, etc, blah, blah.

I know its got to be a simple problem, I can taste it.
Ahhh... I thought you may have typoed on the IP (start with a 3 instead of a 2) or something. Anyhow, I don't have any experience with this kind of thing yet.. so I'm not sure what the problem is. Have you double checked all other configuration options?
joepie91
Sr. Member
****
Offline Offline

Activity: 294


View Profile
July 08, 2011, 12:34:06 PM
 #7

Yeah I'm starting to lose sleep over this, I got it succesfully working on my local computer, and my ex-vps(is that a word?) and on my new vps it is supposed to be Anti-DDoS so maybe they are blocking the port who knows
So I have a wierd error my code is this
Code:
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost, 8332);

This part works and when it print_r($bitcoinController);
I see that it outputs and array like this
Quote
BitcoinClient Object ( [no_multicall] => 1 [return_type] => jsonrpcvals [path] => / [server] => 316.28.27.298 [port] => 8332 [method] => http [errno] => [errstr] => [debug] => 0 [username] => xxxxx [password] => xxxxx [authtype] => 1 [cert] => [certpass] => [cacert] => [cacertdir] => [key] => [keypass] => [verifypeer] => 1 [verifyhost] => 0 [proxy] => [proxyport] => 0 [proxy_user] => [proxy_pass] => [proxy_authtype] => 1 [cookies] => Array ( ) [extracurlopts] => Array ( ) [accepted_compression] => Array (
  • => gzip [1] => deflate ) [request_compression] => [xmlrpc_curl_handle] => [keepalive] => 1 [accepted_charset_encodings] => Array (
  • => UTF-8 [1] => ISO-8859-1 [2] => US-ASCII ) [request_charset_encoding] => [user_agent] => XML-RPC for PHP 3.0.0.beta )
The above array looks like it is either connecting successfully, or it just reads the config to get all the info and stops(Can someone clear this up that the array means its connecting, scince isn't bitcoin-php is supposed to fail on bad connection?)

anyways, when it try{}catch{} it and try to output the exception i get no errors the script just skips over it basically.

I can't even do a simple $bitcoinController->getDifficulty(); after connecting it just dosn't out put anything
I have php errors set to E_ERROR | E_WARNING | E_PARSE | E_NOTICE just so I can pick up on anything... what is wrong?
316.28.27.298 does not look like a valid IP to me.

It sure isn't my server isn't secure enough yet for me to realease it. But I did copy and paste it into the config files and they do match correctly. I can connecto through pushpool and start mining just fine. Its just that through php (maybe user permissions?) it dosn't want to connect to it. I also tried setting up a cross server mysql for remote server and that worked just fine with out opening an ports. So in other words I was able to connect from my webhosting->to VPS database succesfully but the bitcoin server wasn't connecting, so I tried doing this locally instead of a remote server and the local server reports no errors yet when I tried connected remotly it said BitcoinClient
  • Error Conneciton(111) excpetion,etc, etc, blah, blah.

I know its got to be a simple problem, I can taste it.
Ahhh... I thought you may have typoed on the IP (start with a 3 instead of a 2) or something. Anyhow, I don't have any experience with this kind of thing yet.. so I'm not sure what the problem is. Have you double checked all other configuration options?
Where is your current VPS hosted? The one with the DDoS protection (in terms of datacenter, not specifically hosting company)?

Like my post(s)? 12TSXLa5Tu6ag4PNYCwKKSiZsaSCpAjzpu Smiley
Quote from: hawks5999
I just can't wait for fall/winter. My furnace never generated money for me before. I'll keep mining until my furnace is more profitable.
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 08, 2011, 12:36:58 PM
 #8

Yeah I'm starting to lose sleep over this, I got it succesfully working on my local computer, and my ex-vps(is that a word?) and on my new vps it is supposed to be Anti-DDoS so maybe they are blocking the port who knows
So I have a wierd error my code is this
Code:
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost, 8332);

This part works and when it print_r($bitcoinController);
I see that it outputs and array like this
Quote
BitcoinClient Object ( [no_multicall] => 1 [return_type] => jsonrpcvals [path] => / [server] => 316.28.27.298 [port] => 8332 [method] => http [errno] => [errstr] => [debug] => 0 [username] => xxxxx [password] => xxxxx [authtype] => 1 [cert] => [certpass] => [cacert] => [cacertdir] => [key] => [keypass] => [verifypeer] => 1 [verifyhost] => 0 [proxy] => [proxyport] => 0 [proxy_user] => [proxy_pass] => [proxy_authtype] => 1 [cookies] => Array ( ) [extracurlopts] => Array ( ) [accepted_compression] => Array (
  • => gzip [1] => deflate ) [request_compression] => [xmlrpc_curl_handle] => [keepalive] => 1 [accepted_charset_encodings] => Array (
  • => UTF-8 [1] => ISO-8859-1 [2] => US-ASCII ) [request_charset_encoding] => [user_agent] => XML-RPC for PHP 3.0.0.beta )
The above array looks like it is either connecting successfully, or it just reads the config to get all the info and stops(Can someone clear this up that the array means its connecting, scince isn't bitcoin-php is supposed to fail on bad connection?)

anyways, when it try{}catch{} it and try to output the exception i get no errors the script just skips over it basically.

I can't even do a simple $bitcoinController->getDifficulty(); after connecting it just dosn't out put anything
I have php errors set to E_ERROR | E_WARNING | E_PARSE | E_NOTICE just so I can pick up on anything... what is wrong?
316.28.27.298 does not look like a valid IP to me.

It sure isn't my server isn't secure enough yet for me to realease it. But I did copy and paste it into the config files and they do match correctly. I can connecto through pushpool and start mining just fine. Its just that through php (maybe user permissions?) it dosn't want to connect to it. I also tried setting up a cross server mysql for remote server and that worked just fine with out opening an ports. So in other words I was able to connect from my webhosting->to VPS database succesfully but the bitcoin server wasn't connecting, so I tried doing this locally instead of a remote server and the local server reports no errors yet when I tried connected remotly it said BitcoinClient
  • Error Conneciton(111) excpetion,etc, etc, blah, blah.

I know its got to be a simple problem, I can taste it.
Ahhh... I thought you may have typoed on the IP (start with a 3 instead of a 2) or something. Anyhow, I don't have any experience with this kind of thing yet.. so I'm not sure what the problem is. Have you double checked all other configuration options?
Where is your current VPS hosted? The one with the DDoS protection (in terms of datacenter, not specifically hosting company)?

Not sure if i understood your question but it is located in chicago. Im pretty sure you were asking for somthing else, I just can't figure whatchu mean tho.

For update: I can succesfully run $bitcoinController->can_connect(); and echo it. when i do it results with this outout
Quote
Connect error: Connection refused (111)

So thats a step forward in progress, apperently it dosen't want to connect.
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 08, 2011, 01:07:13 PM
 #9

Maybe php5 needs some packages I didn't install, like i said this worked on two different servesr with different versions of ubuntu just fine.... is there a XML RPC package i dont know about?
This is a fresh install of ubuntu so i wouldn't doubt it
joepie91
Sr. Member
****
Offline Offline

Activity: 294


View Profile
July 08, 2011, 01:17:44 PM
 #10

I sent you a PM Smiley

Like my post(s)? 12TSXLa5Tu6ag4PNYCwKKSiZsaSCpAjzpu Smiley
Quote from: hawks5999
I just can't wait for fall/winter. My furnace never generated money for me before. I'll keep mining until my furnace is more profitable.
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 09, 2011, 05:31:48 AM
 #11

I sent you a PM Smiley

Thanks mate for any help that you could assist me with, the support said that it just dosen't want to listen on the givin IP address, so far i got it to listen on the local ip address, but still dosn't want to allow connections from a remote server
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!