Bitcoin Forum
May 10, 2024, 12:18:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: PHP Error shows RPC info  (Read 1357 times)
sentry (OP)
Newbie
*
Offline Offline

Activity: 88
Merit: 0


View Profile
May 28, 2011, 04:42:37 AM
 #1

Code:
Warning: fopen(http://...@127.0.0.1:8332) [function.fopen]: failed to open stream: HTTP request failed! in \www\classes\jsonRPCClient.php on line 132

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://USER:PASS@127.0.0.1:8332' in\www\classes\jsonRPCClient.php:140 Stack trace: #0 \www\vote.php(32): jsonRPCClient->__call('getbalance', Array) #1 \www\vote.php(32): jsonRPCClient->getbalance('ec8956637a99787...') #2 {main} thrown in \www\classes\jsonRPCClient.php on line 140

How can I avoid this? This error pops up occasionally and refreshing the page always works. I just wish it wouldn't show the RPC username and password.
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 28, 2011, 04:43:59 AM
 #2

Configure PHP properly. Errors should NEVER be sent to the browser. Specifically, display_errors should be off.

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
sentry (OP)
Newbie
*
Offline Offline

Activity: 88
Merit: 0


View Profile
May 28, 2011, 04:44:31 AM
 #3

Thanks! Smiley
SomeoneWeird
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500


View Profile
May 28, 2011, 04:44:44 AM
 #4

That's the base url, afaik json server are like 127.0.0.1:<port>/results.json or something.
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!