Bitcoin Forum
July 13, 2024, 10:41:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [29] 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 »
561  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 06:01:44 AM
when I try to edit the debug.log it does not have anything inside at all. its just an empty file.

do i need to shut netcoind down before trying to view/edit this file for a result?
562  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 02:24:28 AM
ok I put

Host:            1
Login:    2
Password:    3
Port:          4

and it returned this

Unable to connect to http://2:3@1:4/

so if its supposed to be

http://Http://username:password@hostname:port/

his order is correct Sad
563  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 02:20:11 AM
I've had so many problems with connecting externally, never could get it to do it. I just gave up and installed the wallet and the website on the same vps and that worked. its also much safer because you can close and ban outside attempts to connect, removing the possibility of someone getting into your wallet.


its not working either way LMAO,

 plus we know connection and communication is not the problem the script lisek had me try worked with no problems.

So I am sure it has to be the script somehwere somehow I just have to find it. I really REALLY like this games layout, this is why i wont give up. so,  I really do not want to try and get another one.

do you know how it should look?

dos this look correct

http://my.vps.ip.addy:port@username:password/

Usually like this:

http://Http://username:password@hostname:port/

Which it looks like the code should generate, BUT, using $_GET you could have something being passed improperly.



actually I will have to m,ess them up again to check the order its putting them in LOL maybe it could be that

CR1776 thank you so much for trying to help me sir, I really do appreciate your time. If you and I somehow figure this out I will certainly send you some BTC out of the profits in the site.
564  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 02:16:08 AM
Ok how would the script get any kind of ID from a getbalance request?

Even a getinfo request will not show an ID unless the ID the scripts is talking about is the ip address

of this is the case then it should not bee seeking n ID but more so an IP

I am just guessing I have been string at this code for over a week now trying anything and everything to get it to work. I had no choice but to bother you guys here.
565  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 02:08:30 AM
Re the log, I was thinking in

~/.bitcoin/debug.log

(Or wherever the path is for this coin).

If his code works, then it has to be something with this code being incorrect. In the debug.log, perhaps it will show an error when your web server goes to connect.  Assuming the web sever has created the proper URL.

Regarding the question about the url, you could just echo this to the display (temporarily of course)  or a temp variable depending on the development environment you are using just to ensure that everything is being filled in properly:

'http://'.$_GET['w_user'].':'.$_GET['w_pass'].'@'.$_GET['w_host'].':'.$_GET['w_port'].'/';

E.g. If the w_port is wrong or any of the others that could be an issue.   It should be a quick thing to check that the url is being created properly.

Ok sir I moved them around its not that, because when I move them around I get a different error involving the address itself being contacted, so we can be sure the order he has them in is correct.

so from what I can tell now is the information being received is not matching the information the script believes it should be. So it is giving an ID error. does this sound right to you?
566  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 01:59:27 AM
I've had so many problems with connecting externally, never could get it to do it. I just gave up and installed the wallet and the website on the same vps and that worked. its also much safer because you can close and ban outside attempts to connect, removing the possibility of someone getting into your wallet.


its not working either way LMAO,

 plus we know connection and communication is not the problem the script lisek had me try worked with no problems.

So I am sure it has to be the script somehwere somehow I just have to find it. I really REALLY like this games layout, this is why i wont give up. so,  I really do not want to try and get another one.

do you know how it should look?

dos this look correct

http://my.vps.ip.addy:port@username:password/
567  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 01:52:29 AM
I've had so many problems with connecting externally, never could get it to do it. I just gave up and installed the wallet and the website on the same vps and that worked. its also much safer because you can close and ban outside attempts to connect, removing the possibility of someone getting into your wallet.


its not working either way LMAO,

 plus we know connection and communication is not the problem the script lisek had me try worked with no problems.

So I am sure it has to be the script somehwere somehow I just have to find it. I really REALLY like this games layout, this is why i wont give up. so,  I really do not want to try and get another one.
568  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 01:09:55 AM
I am trying everything,

should this

Code:
function checkWallet() {
            $.ajax({
              'url': './driver_test_call.php?w_user='+$("input#w_user").val()+'&w_pass='+$("input#w_pass").val()+'&w_host='+$("input#w_host").val()+'&w_port='+$("input#w_port").val(),
              'dataType': "json",
              'success': function(data) {
                document.getElementById('mform').submit();
              },
              'error': function() {
                alert('Wallet error! Can\'t connect to wallet! Please check if provided informations are correct and try again.');
              }
            });
          }

actually say this

Code:
function checkWallet() {
            $.ajax({
              'url': './driver_test_call.php?w_user='+$("input#w_user").val()+'&w_pass='+$("input#w_pass").val()+'&w_host='+$("input#w_host").val()+'&w_port='+$("input#w_port").val(),
              'dataType': "json",
              'success': function(data) {
                if (data['error']=='no') document.getElementById('mform').submit();              },
               {
                else alert('Wallet error! Can\'t connect to wallet! Please check if provided informations are correct and try again.');
              }
            });
          }
569  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 12:42:12 AM
I am not sure if order matters but shuld these

Code:
<h3>Wallet Info</h3>
              <i>Please fill in correct wallet info:</i>
              <br>
              <table>
                <tr>
                  <td>Host:</td>
                  <td><input type="text" name="w_host" id="w_host" value="localhost"></td>
                </tr>
                <tr>
                  <td>Login:</td>
                  <td><input type="text" name="w_user" id="w_user" placeholder="Wallet user"></td>
                </tr>
                <tr>
                  <td>Password:</td>
                  <td><input type="text" name="w_pass" id="w_pass" placeholder="Wallet password"></td>
                </tr>
                <tr>
                  <td>Port:</td>
                  <td><input type="text" name="w_port" id="w_port" placeholder="Wallet port"></td>

be in the same order as this

Code:
$test=new jsonRPCClient('http://'.$_GET['w_user'].':'.$_GET['w_pass'].'@'.$_GET['w_host'].':'.$_GET['w_port'].'/');

and this

Code:
function checkWallet() {
            $.ajax({
              'url': './driver_test_call.php?w_user='+$("input#w_user").val()+'&w_pass='+$("input#w_pass").val()+'&w_host='+$("input#w_host").val()+'&w_port='+$("input#w_port").val(),
              'dataType': "json",
              'success': function(data) {
                document.getElementById('mform').submit();
              },
              'error': function() {
                alert('Wallet error! Can\'t connect to wallet! Please check if provided informations are correct and try again.');

by order I mean shoud they all follow suite

user then pass then host then port

the first one order does not match the rest
570  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 12:37:31 AM
Show entire file index.php

Code:
<?php
/*
 *  © BitcoinDice 


 
*/


if (isset($_GET['checkCons'])) {
  if (@!
mysql_connect($_POST['db_host'],$_POST['db_user'],$_POST['db_pass']) || @!mysql_select_db($_POST['db_name'])) {
    
header('Location: ./?step=3&db');
    exit();
  }

  
$included_=true;
  include 
'db_data.php';
  
  
$db_file=fopen('../inc/db-conf.php','wb');
  
fwrite($db_file,"<?php \n");          
  
fwrite($db_file,'$conf_c=true;'."\n");          
  
fwrite($db_file,'mysql_connect(\''.$_POST['db_host'].'\',\''.$_POST['db_user'].'\',\''.$_POST['db_pass'].'\');'."\n");
  
fwrite($db_file,'mysql_select_db(\''.$_POST['db_name'].'\');'."\n");
  
fwrite($db_file,'mysql_query("SET NAMES utf8");'."\n");
  
fwrite($db_file,"?>
");      ?><?php
  fclose
($db_file);

  
$w_file=fopen('../inc/driver-conf.php','wb');
  
fwrite($w_file,"<?php \n");          
  
fwrite($w_file,'$driver_login=\'http://'.$_POST['w_user'].':'.$_POST['w_pass'].'@'.$_POST['w_host'].':'.$_POST['w_port'].'/\';'."\n");
  
fwrite($w_file,"?>
");      ?><?php
  fclose
($w_file);

  
header('Location: ./?step=4');
  exit();
}

if (isset(
$_GET['saveB'])) {
  include 
'../inc/db-conf.php';
  
mysql_query("UPDATE `system` SET `title`='$_POST[s_title]',`url`='$_POST[s_url]',`currency`='$_POST[s_cur]',`currency_sign`='$_POST[s_cur_sign]',`description`='$_POST[s_desc]' WHERE `id`=1");
  
header('Location: ./?step=5');
  exit();
}

if (empty(
$_GET['step']) || ($_GET['step']!=&& $_GET['step']!=&& $_GET['step']!=&& $_GET['step']!=&& $_GET['step']!=&& $_GET['step']!=6)) {
  
header('Location: ./?step=1');
  exit();
}
else 
$step=$_GET['step'];

if (
$step==&& (!is_writable('../inc/db-conf.php') || !is_writable('../inc/driver-conf.php'))) {
  
header('Location: ./?step=2');
  exit();
}
?>

<!DOCTYPE html>
<html>
  <head>
    <title>BitcoinDice 2.0 - Installation</title>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="./install_page.css">
    <link rel="shortcut icon" href="./favicon.ico">
    <script type="text/javascript" src="jquery.js"></script>
  </head>
  <body>
    <div class="allbody">
      <div class="alls" style="text-align: center;">
        <h1>BitcoinDice 2.0 Installation</h1>
      </div>
    </div>
    <?php
    
switch ($step) {
      case 
1:
      
?>

        <script type="text/javascript">
          function next() {
            window.location.href='./?step=2';
          }
        </script>
        <div class="allbody">
          <div class="alls">
            <h3>Welcome!</h3>
            This is an automatic installation script. Please, follow the instructions on the following screens.
          </div>
        </div>
      <?php
      
break;
      case 
2:
      
?>

        <script type="text/javascript">
          function next() {
            window.location.href='./?step=3';
          }
        </script>
        <div class="allbody">
          <div class="alls">
            <h3>File Permissions</h3>
            Please make sure that following files are writable (chmod 777):
            <br>
            <table>
              <tr>
                <td><i>inc/db-conf.php</i></td>
                <td>&nbsp;&nbsp;</td>
                <td><?php if (is_writable('../inc/db-conf.php')) { echo '<span style="color: green;"><b>Yes</b></span>'; } else { echo '<span style="color: red;"><b>No</b></span>'; } ?></td>
              </tr>
              <tr>
                <td><i>inc/driver-conf.php</i></td>
                <td>&nbsp;&nbsp;</td>
                <td><?php if (is_writable('../inc/driver-conf.php')) { echo '<span style="color: green;"><b>Yes</b></span>'; } else { echo '<span style="color: red;"><b>No</b></span>'; } ?></td>
              </tr>
            </table>
            <br>
            The above files should be writable, otherwise the installation will not continue!
          </div>
        </div>
      <?php
      
break;
      case 
3:
      
?>

        <script type="text/javascript">
          function next() {
            $.ajax({
              'url': './db_test_call.php?db_user='+$("input#db_user").val()+'&db_pass='+$("input#db_pass").val()+'&db_host='+$("input#db_host").val()+'&db_db='+$("input#db_db").val(),
              'dataType': "json",
              'success': function(data) {
                if (data['error']=='no') checkWallet();
                else alert('Database error! Can\'t connect to database! Please check if provided informations are correct and try again.');
              }
            });
          }
          function checkWallet() {
            $.ajax({
              'url': './driver_test_call.php?w_user='+$("input#w_user").val()+'&w_pass='+$("input#w_pass").val()+'&w_host='+$("input#w_host").val()+'&w_port='+$("input#w_port").val(),
              'dataType': "json",
              'success': function(data) {
                document.getElementById('mform').submit();
              },
              'error': function() {
                alert('Wallet error! Can\'t connect to wallet! Please check if provided informations are correct and try again.');
              }
            });
          }
        </script>
        <div class="allbody">
          <div class="alls">
            <form id="mform" method="post" action="./?checkCons">
              <h3>Database Info</h3>
              <i>Please fill in correct database info:</i>
              <br>
              <table>
                <tr>
                  <td>Host:</td>
                  <td><input type="text" name="db_host" id="db_host" value="localhost"></td>
                </tr>
                <tr>
                  <td>Username:</td>
                  <td><input type="text" name="db_user" id="db_user" placeholder="DB user"></td>
                </tr>
                <tr>
                  <td>Password:</td>
                  <td><input type="text" name="db_pass" id="db_pass" placeholder="DB pass"></td>
                </tr>
                <tr>
                  <td>Database:</td>
                  <td><input type="text" name="db_name" id="db_db" placeholder="DB name"></td>
                </tr>
              </table>
             
              <h3>Wallet Info</h3>
              <i>Please fill in correct wallet info:</i>
              <br>
              <table>
                <tr>
                  <td>Host:</td>
                  <td><input type="text" name="w_host" id="w_host" value="localhost"></td>
                </tr>
                <tr>
                  <td>Login:</td>
                  <td><input type="text" name="w_user" id="w_user" placeholder="Wallet user"></td>
                </tr>
                <tr>
                  <td>Password:</td>
                  <td><input type="text" name="w_pass" id="w_pass" placeholder="Wallet password"></td>
                </tr>
                <tr>
                  <td>Port:</td>
                  <td><input type="text" name="w_port" id="w_port" placeholder="Wallet port"></td>
                </tr>
              </table>
            </form>
          </div>
        </div>
      <?php
      
break;
      case 
4:
      
?>

        <script type="text/javascript">
          function next() {
            document.getElementById('mform').submit();
          }
        </script>
        <div class="allbody">
          <div class="alls">
            <h3>Basic Settings</h3>
            <br>
            <form id="mform" action="./?saveB" method="post">
              <table>
                <tr>
                  <td>Site title:</td>
                  <td><input type="text" name="s_title"></td>
                </tr>
                <tr>
                  <td>Site description:</td>
                  <td><input type="text" name="s_desc"></td>
                </tr>
                <tr>
                  <td>URL:</td>
                  <td><input type="text" name="s_url"></td>
                  <td>(<b>without <i>http://</i></b>)</td>
                </tr>
                <tr>
                  <td>Currency:</td>
                  <td><input type="text" name="s_cur" value="Netcoin" disabled></td>
                </tr>
                <tr>
                  <td>Currency sign:</td>
                  <td><input type="text" name="s_cur_sign" value="NET" disabled></td>
                </tr>
              </table>
            </form>
          </div>
        </div>
      <?php
      
break;
      case 
5:
      
?>

        <script type="text/javascript">
          function next() {
            window.location.href='./?step=6';
          }
        </script>
        <div class="allbody">
          <div class="alls">
            <h3>CRON setup</h3>
            In order to BitcoinDice 2.0 to work properly, you must have the CRON set this way:
            <br><br>
            <b>Every 1 minute</b>: <i>content/cron/check_deposits.php</i>
            <br><br><hr>
            <b>Example (Linux):</b>
            <br><br>
            1) <i>Open CRON table:</i>
            <br>
            $ crontab -e
            <br><br>
            2) <i>Add the following line:</i>
            <br>
            * * * * * cd /var/www/content/cron; php check_deposits.php;
            <br><br>
            3) Save CRON table by pressing <b>CTRL</b>+<b>X</b>, than confirm (<b>Y</b>) and press <b>enter</b>.
            <br><br>
            4) Restart CRON service:
            <br>
            $ service cron restart
            <br><br>
            That's all.           
             
          </div>
        </div>
      <?php
      
break;
      case 
6:
      
?>

        <div class="allbody">
          <div class="alls">
            <h3>Thank You!</h3>
            <br>
            Your installation is done! You can login to administration or try your luck at your own gambling site :-)
            <br>
            <br>
            Admin details:<br>
            &nbsp;Username: <b>admin</b><br>
            &nbsp;Password: <b>admin</b>
            <br>
            <br>
            <i>Don't forget to change this info after first login!</i>
            <br>
            <br>
            <b>Warning!</b> Please remove the <i>/install</i> directory now, otherwise there is a security risk.
          </div>
        </div>
      <?php        
      
break;
    }
    
?>
   
    <div class="allbody">
      <div class="alls" style="padding: 5px; height: 30px;">
        <div style="float: left; font-style: italic;">
          <h2>Step: <?php echo $step?></h2>
        </div>
        <div style="float: right;">
          <?php
          
if ($step==6) echo '<input id="next" type="button" onclick="javascript:window.location.href=\'../admin/\';" value="Go to Admin!" style="padding: 5px;">';
          else echo 
'<input id="next" type="button" onclick="javascript:next();" value="Next ->" style="padding: 5px;"';
          
?>

        </div>
      </div>
    </div>
    <?php
    
if ($step==&& isset($_GET['db'])) echo '<script type="text/javascript">alert("Can\'t connect to database! Please check if provided informations are correct and try again.");</script>';
    
?>

  </body>
</html>
571  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 05, 2015, 12:31:11 AM
coin wallet  not need be synchronized to my script will work for you

your test showed the getinfo I see when I type netcoind getinfo

coin wallet (netcoind) may be in the directory as compiled or upload it to the root folder

To replace wallet.dat file, you need to stop the coin wallet (netcoind)

I did stop the wallet before maing any changes, but it still did very weird things LOL I even stopped and rebooted VPS and still same problems But like I said it is very OK no problems Smiley I just moved the coins out of the old wallet and threw it away since I have to resync anyways Smiley



In that case, it must also work getbalance, getnewaddress, etc.

Your script should work too.

Yes, That is good news that your script worked for him!

regarding $driver_login that is a variable.  I don't believe there is a file named that.

Can you check the coind logs on the coind server to see if it gives any error message?



I am not sure where to find that, I looked at the db.log and debug.log and there was nothing in them at all. is that what you were talking about??

well At least now I do know its not y communications its something wrong inside the code. I just can not find it, I do know I can force ti to get thru the installation is I tell it to accept all variables as true but once the site loads you can not deposit coins Sad it still is not connecting to the wallet

what i mean is take this code

$this->debug && $this->debug.='***** Server response *****'."\n".$response.'***** End of server response *****'."\n";
$response = json_decode($response,true);
} else {
throw new Exception('Unable to connect to '.$this->url);
}
if ($this->debug) {
echo nl2br($debug);
}
if (!$this->notification) {
if ($response['id'] != $currentId) {
throw new Exception('Incorrect response id (request id: '.$currentId.', response id: '.$response['id'].')');
}

if (!is_null($response['error'])) {
throw new Exception('Request error: '.$response['error']);
}

return $response['result'];
} else {
return true;

and make it say

$this->debug && $this->debug.='***** Server response *****'."\n".$response.'***** End of server response *****'."\n";
$response = json_decode($response,true);
} else {
throw new Exception('Unable to connect to '.$this->url);
}
if ($this->debug) {
echo nl2br($debug);
}
if (!$this->notification) {
if ($response['id'] != $currentId)
return true;
if (!is_null($response['error']))
return true;
return $response['result'];
} else {
return true;

it will get thru the installation but the wallet still wont work Sad

so what that tells me is it is a code that is present both during the installation and used after the installation.

but so far the only one I have seen is the driver_test.php which is the exact same file as the wallet_driver.php in another folder. since you are supposed to delete the install file after installation I decided to look for matching files elesewhere in the directories.
572  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 10:56:58 PM
I found this in the index.php


fwrite($w_file,'$driver_login=\'http://'.$_POST['w_user'].':'.$_POST['w_pass'].'@'.$_POST['w_host'].':'.$_POST['w_port'].'/\';'."\n");

however I looked in every folder and file and can not find a driver_login file anywhere is this a problem??
573  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 10:44:25 PM
I love programming, what should work never does what shouldnt work sometimes does, and when its broke, and you fix it, you hardly ever know how or why HAHA your just happy it worked HAHA
574  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 10:27:55 PM
coin wallet  not need be synchronized to my script will work for you

your test showed the getinfo I see when I type netcoind getinfo

coin wallet (netcoind) may be in the directory as compiled or upload it to the root folder

To replace wallet.dat file, you need to stop the coin wallet (netcoind)

I did stop the wallet before maing any changes, but it still did very weird things LOL I even stopped and rebooted VPS and still same problems But like I said it is very OK no problems Smiley I just moved the coins out of the old wallet and threw it away since I have to resync anyways Smiley
575  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 09:52:31 PM
Try files from this link:

http://white-bitcoin.com/test.zip

In the index.php file, enter the data from the file conf wallet
Upload files to the webserver.

Wallet conf file on the server vps should look like this:

Code:
rpcuser=username
rpcpassword=password
daemon=1
rpcallowip=*
rpcport=11311
port=11310
addNode=63.246.129.56

Restart the coin wallet

Call the address of the page with the file index.php

If the coin wallet is working correctly you should get information from getinfo

If the coin wallet does not work it should throw an error.

Tell me what you receive.

I will try this but it will be in a day or so,

By trying to  move it from the root directory i deleted it Sad so now it has to syn in again, I also noticed I could not copy the old wallet.dat file I had on backup, no matter how I tried it always reverts back to the new wallet.dat file, But no problems, I kept it on my computer and opened the wallet on my computer and sent those coins to my personal wallet then deleted that wallet.dat file. I just thought it was weird it would not copy or replace the new wallet.dat file. even if I deleted the one that was with the install and uploaded the old wallet.dat file 2 things still happened, the wallet.dat file was green in SSH prompt and it still reverted back to the wallet.dat file that came in the new install.
576  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 09:44:42 PM
Hey,
Have you checked to make sure this line, the red part:

Code:
$test=new jsonRPCClient([font=Verdana][b]'http://'.$_GET['w_user'].':'.$_GET['w_pass'].'@'.$_GET['w_host'].':'.$_GET['w_port'].'/'[/b][/font]);

is generating the expected URL?

Since you can telnet to that port on the coin server from the web server, the port is open and listening.   You'd want to check that you are really generating the right URL with the right user/pw, host/port combo.

Also, if you do a
netcoind getinfo

(or whatever) while on the coind server, does it return information?


If those are correct then...hmmmm...

doing a netcoind getinfo does display results and I have sent coins there and they show in the balance, I thought maybe it was because there were no coins in the wallet so i sent some.

how do I check
Code:
$test=new jsonRPCClient([font=Verdana][b]'http://'.$_GET['w_user'].':'.$_GET['w_pass'].'@'.$_GET['w_host'].':'.$_GET['w_port'].'/'[/b][/font]);

to make sure it is generating the expected URL?
577  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 07:41:10 PM
The problem is probably in the fact that the coin daemon does not allow a connection to the outside.

Try these settings in the file  wallet conf:
Code:
rpcuser=username
rpcpassword=password
daemon=1
rpcallowip=*
rpcport=11311
port=11310
addNode=63.246.129.56

After the change, restart the coin wallet

When trying with teh script from my webserver I put in my VPS ip Address, when trying on the VPS I use local host

Wallet info( when the script is on the webserver and the wallet is on my VPS)

Host:  Host
Login: Wallet User
Pass: Wallet Password
Port: port

What i have tried

Wallet info

Host:  VPS IP
Login: rpcusername from wallet.conf
Pass: rpcpassword from wallet.conf
Port: rpc port from wallet.conf

in addition I have also tried

Host:  VPS IP
Login: rpcusername from wallet.conf
Pass: rpcpassword from wallet.conf
Port: port from wallet.conf

-------------------------------------------------------------------------

Wallet info( when the script is on the VPS and the wallet is on my VPS)


Host:  Host
Login: Wallet User
Pass: Wallet Password
Port: port

What i have tried

Wallet info

Host:  localhost
Login: rpcusername from wallet.conf
Pass: rpcpassword from wallet.conf
Port: rpc port from wallet.conf

in addition I have also tried

Host:  localhost
Login: rpcusername from wallet.conf
Pass: rpcpassword from wallet.conf
Port: port from wallet.conf

My conf file

rpcuser=myusername
rpcpassword=mypassword
listen=1
daemon=1
server=1
rpcconnect=VPS IP
rpcconnect=Webserver IP
rpcconnect=Webserver secondary IP
rpcallowip=Webserver IP
rpcallowip=Webserver secondary IP
rpcallowip=VPS IP
rpcallowip=127.0.0.1
rpcport=11311
port=11310
addnode=63.246.129.56
578  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 06:37:00 PM
I have 2 questions

First one,

 I installed the Netcoind in the root directory of the VPS, I have since moved the netcoin folder yet I think all the config and wallet info is still in the root directory would this block communications?

Second one, (if the directory situation is not the problem)

Is the program possibly by default somehow calling bitcoind and not netcoind and possibly by default sending a message

bitcoind getbalance

instead of

netcoind getbalance
579  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 06:24:33 PM
Can you telnet from your server node to the bitcoind server on the ports that are open?  (Or do a scan from your web server to your bitcoind server to see if those ports are accessible externally?)

When you tried it from here:
http://www.canyouseeme.org

did it show they were open?




yes telnet connects

root@webserver hosting:~# telnet MY.VPS.IP.ADDY 11310
Trying MY.VPS.IP.ADDY...
Connected to MY.VPS.IP.ADDY.
Escape character is '^]'.
^]
telnet> q
Connection closed.



root@webserver hosting:~# telnet MY.VPS.IP.ADDY 11311
Trying MY.VPS.IP.ADDY...
Connected to MY.VPS.IP.ADDY.
Escape character is '^]'.
^]
telnet> q
Connection closed.

http://www.canyouseeme.org

does not let me change the IP address, I can change the port but not the IP address
580  Alternate cryptocurrencies / Altcoin Discussion / Re: webserver connecting to a VPS on: February 04, 2015, 06:21:16 PM
Here is the error log from what I am getting
 
[04-Feb-2015 02:03:02 America/New_York] PHP Fatal error:  Uncaught exception 'Exception' with message 'Incorrect response id (request id: 1, response id: )' in /home/dicefort/public_html/netcoin/install/driver_test.php:68
 
Stack trace:
#0 /home/dicefort/public_html/netcoin/install/driver_test_call.php(12): jsonRPCClient->__call('getbalance', Array)
#1 /home/dicefort/public_html/netcoin/install/driver_test_call.php(12): jsonRPCClient->getbalance()
#2 {main}
  thrown in /home/dicefort/public_html/netcoin/install/driver_test.php on line 68
_______________________________________________________________________________ __________
the whole /driver_test_call.php file (Line 12 is in red I deleted a lot of lines that were spaces to shorten the code Smiley
 
<?php
/*
 *  © BitcoinDice
*/
include 'driver_test.php';
$test=new jsonRPCClient('http://'.$_GET['w_user'].':'.$_GET['w_pass'].'@'.$_GET['w_host'].':'.$_GET['w_port'].'/');
@$test_call=$test->getbalance();
echo json_encode(array('result'=>$test_call));
?>
_______________________________________________________________________________ __________
 
driver_test.php (Line 68 is in red)
 
<?php
/*
 *  © BitcoinDice
*/
class jsonRPCClient {
private $debug;
private $url;
private $id;
private $notification = false;
public function __construct($url,$debug = false) {
$this->url = $url;
empty($proxy) ? $this->proxy = '' : $this->proxy = $proxy;
empty($debug) ? $this->debug = false : $this->debug = true;
$this->id = 1;
}
public function setRPCNotification($notification) {
empty($notification) ?
$this->notification = false
:
$this->notification = true;
}
public function __call($method,$params) {
if (!is_scalar($method)) {
throw new Exception('Method name has no scalar value');
}
if (is_array($params)) {
$params = array_values($params);
} else {
throw new Exception('Params must be given as array');
}
if ($this->notification) {
$currentId = NULL;
} else {
$currentId = $this->id;
}
$request = array(
'method' => $method,
'params' => $params,
'id' => $currentId
);
$request = json_encode($request);
$this->debug && $this->debug.='***** Request *****'."\n".$request."\n".'***** End Of request *****'."\n\n";
$opts = array ('http' => array (
'method'  => 'POST',
'header'  => 'Content-type: application/json',
'content' => $request
));
$context  = stream_context_create($opts);
if ($fp = fopen($this->url, 'r', false, $context)) {
$response = '';
while($row = fgets($fp)) {
$response.= trim($row)."\n";
}
$this->debug && $this->debug.='***** Server response *****'."\n".$response.'***** End of server response *****'."\n";
$response = json_decode($response,true);
} else {
throw new Exception('Unable to connect to '.$this->url);
}
if ($this->debug) {
echo nl2br($debug);
}
if (!$this->notification) {
if ($response['id'] != $currentId) {
throw new Exception('Incorrect response id (request id: '.$currentId.', response id: '.$response['id'].')');
}
if (!is_null($response['error'])) {
throw new Exception('Request error: '.$response['error']);
}
return $response['result'];
} else {
return true;
}
}
}
?>
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [29] 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!