Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: sentry on May 28, 2011, 04:42:37 AM



Title: PHP Error shows RPC info
Post by: sentry on May 28, 2011, 04:42:37 AM
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.


Title: Re: PHP Error shows RPC info
Post by: error on May 28, 2011, 04:43:59 AM
Configure PHP properly. Errors should NEVER be sent to the browser. Specifically, display_errors (http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors) should be off.


Title: Re: PHP Error shows RPC info
Post by: sentry on May 28, 2011, 04:44:31 AM
Thanks! :)


Title: Re: PHP Error shows RPC info
Post by: SomeoneWeird on May 28, 2011, 04:44:44 AM
That's the base url, afaik json server are like 127.0.0.1:<port>/results.json or something.