Pages:
Author

Topic: [Pushpool Web Frontend] Simplecoin v5.0 Opensource PHP/MySQL - NEW RELEASE - page 3. (Read 57191 times)

legendary
Activity: 3122
Merit: 1032
#1 VIP Crypto Casino
/cronjobs/cronjob.php

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /var/www/mpool/includes/block.php on line 6 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /var/www/mpool/includes/block.php on line 16 Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/mpool/includes/block.php on line 24 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /var/www/mpool/includes/block.php on line 54 Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /var/www/mpool/includes/block.php on line 59 Notice: Trying to get property of non-object in /var/www/mpool/includes/block.php on line 60 Notice: Trying to get property of non-object in /var/www/mpool/includes/block.php on line 61 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

My table networkBlocks is empty. Which script does update it? And can I get somewhere dump of this table?
sr. member
Activity: 406
Merit: 250
Got a problem. Pool has found 2 blocks, I can see in wallet about 100 btc, but pool stat does not show founded blocks Sad
Need your urgent help!!!
Table "winning_shares" is empty.
Table "networkBlocks" is empty.

Simplecoin v.5
Mysql 5.1.54

cronjob.php returns "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"


Ok, what line number is the error coming from (there are LOTS of sql calls from many classes in cronjob) ?

V5 was fairly solid out of the box, so hopefully this is a simple fix.
legendary
Activity: 3122
Merit: 1032
#1 VIP Crypto Casino
Got a problem. Pool has found 2 blocks, I can see in wallet about 100 btc, but pool stat does not show founded blocks Sad
Need your urgent help!!!
Table "winning_shares" is empty.
Table "networkBlocks" is empty.

Simplecoin v.5
Mysql 5.1.54

cronjob.php returns "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
sr. member
Activity: 406
Merit: 250
Hello everyone,

I set all the parameters of my previous scripts and everything works fine, but I want to move to this one because I prefer this script, but I get the following error:

Fatal error: Uncaught BitcoinClientException:
  • : Connect error: Connection refused (111) thrown in on line 0

bitcoind working on port 8332
Workers have a communication with a pushpoold on 8341 and 8344 port.

I entered all that is needed in requiredFunctions.php, and tried different ports but still get that error.

What could be the problem?

Thank you in advance for your reply,


You should have port 8332 set then. Also, make sure the calling machine has access in the bitcoin.conf file as well as the firewall.
sr. member
Activity: 406
Merit: 250
Sorry I've been AWOL from this thread, but between developing the new version and my best friends marriage things have been hectic.

The new version is so close to stable. The current slowdown is the creation of a dynamic long-polling proxy to use with the new frontend.
hero member
Activity: 556
Merit: 500
Does anyone know where simplecoin writes to the unconfirmed_rewards table in the database? I see a function that reads from it but where does it write to it?
edit: found it in rewards

mysql_query("INSERT INTO unconfirmed_rewards (userId, blockNumber, amount, shares) VALUES ($userid, $blockNumber, '$totalReward', $uncountedShares)");
newbie
Activity: 30
Merit: 0
Hello everyone,

I set all the parameters of my previous scripts and everything works fine, but I want to move to this one because I prefer this script, but I get the following error:

Fatal error: Uncaught BitcoinClientException:
  • : Connect error: Connection refused (111) thrown in on line 0

bitcoind working on port 8332
Workers have a communication with a pushpoold on 8341 and 8344 port.

I entered all that is needed in requiredFunctions.php, and tried different ports but still get that error.

What could be the problem?

Thank you in advance for your reply,
legendary
Activity: 3122
Merit: 1032
#1 VIP Crypto Casino
Any body know, why MtGox rate don't shows correct about 5 last days? They changed a code?
member
Activity: 78
Merit: 10
I tried to do this to fix the changing password problem .

I changed this line
$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]));
to
$oldPass = hash("sha256", $oldPass.$salt, mysql_real_escape_string($_POST["currentPassword"]));

But it didn't work.

The update process starts with
if($oldPass == $hashedPass){

I tried to define $hashedPass and fetch the password from the DB to  it .
Still didn't work .

And says
"You must type in the correct current password before you can set a new password. "

Please help

$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]).$salt);


It works now !! Smiley Thanks a lot man Smiley
legendary
Activity: 3122
Merit: 1032
#1 VIP Crypto Casino
I tried to do this to fix the changing password problem .

I changed this line
$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]));
to
$oldPass = hash("sha256", $oldPass.$salt, mysql_real_escape_string($_POST["currentPassword"]));

But it didn't work.

The update process starts with
if($oldPass == $hashedPass){

I tried to define $hashedPass and fetch the password from the DB to  it .
Still didn't work .

And says
"You must type in the correct current password before you can set a new password. "

Please help

$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]).$salt);
member
Activity: 78
Merit: 10
I tried to do this to fix the changing password problem .

I changed this line
$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]));
to
$oldPass = hash("sha256", $oldPass.$salt, mysql_real_escape_string($_POST["currentPassword"]));

But it didn't work.

The update process starts with
if($oldPass == $hashedPass){

I tried to define $hashedPass and fetch the password from the DB to  it .
Still didn't work .

And says
"You must type in the correct current password before you can set a new password. "

Please help
member
Activity: 78
Merit: 10
- Resetting the password with lostpassword didn't work for me, i edited it to be http:// and not https:// as it is in lostpassword.php.
It even ruins the password, even the old password stops working. What should i do ?
I think it is because lostpassword.php uses sha256 encryption and the login.php uses the $salt thing ?

lostpassword.php, line 53 must be like:
$result = mysql_query("UPDATE webUsers SET pass='".hash("sha256", $pass.$salt)."', accountFailedAttempts = 0 WHERE  username='$resetUsername' AND emailAuthPin='$resetAuth' ");
Yeah it works now Smiley thanks .

The only problem left is in changing the password , any idea ? It doesn't recognize that i inserted my current password ...
legendary
Activity: 3122
Merit: 1032
#1 VIP Crypto Casino
- Resetting the password with lostpassword didn't work for me, i edited it to be http:// and not https:// as it is in lostpassword.php.
It even ruins the password, even the old password stops working. What should i do ?
I think it is because lostpassword.php uses sha256 encryption and the login.php uses the $salt thing ?

lostpassword.php, line 53 must be like:
$result = mysql_query("UPDATE webUsers SET pass='".hash("sha256", $pass.$salt)."', accountFailedAttempts = 0 WHERE  username='$resetUsername' AND emailAuthPin='$resetAuth' ");
member
Activity: 78
Merit: 10
i tested it , it doesn't have the problems v4 had !
Thanks a lot !

I faced few things though :
- Resetting the password with lostpassword didn't work for me, i edited it to be http:// and not https:// as it is in lostpassword.php.
It even ruins the password, even the old password stops working. What should i do ?
I think it is because lostpassword.php uses sha256 encryption and the login.php uses the $salt thing ?

- in accountdetails.php , you added the field ( current password ) to change the password, but even though you put the password it says " you must put your current password" , it doesn't  recognize it .

Thanks a lot simplecoin ! you are awesome ! Smiley
sr. member
Activity: 406
Merit: 250
You'll need to add the new table (unrewarded_shares) and look for other sql changes.
member
Activity: 78
Merit: 10
Thanks for the effort.
How can i upgrade from v4 to v5?
sr. member
Activity: 406
Merit: 250
Version 5 is released  Cool

A lot of bug fixes, especially for new pools!
Even more optimization to sql (especially for multi-million share rounds )
Main cronjob can run every minute with very little impact.
Winning shares are much more easily handled.
Also unconfirmed shares are perfectly accurate.

Tested with lastnpps scoring, will be testing prop soon.

Now to get multi-pool/coin support into the base.
member
Activity: 78
Merit: 10
ok I almost have your pool up I have one sql issue thats causing the site to fail. I get
Code:
PHP Fatal error:  Call to a member function fetch() on a non-object in /var/www/simplecoin/includes/stats.php on line 276

So I google some and take a look at line 276, I see its under function usersharecount()
Code:
if ($currentSharesR = $currentSharesQ->fetch()) {

Apparently when the fetch fails it returns a false, and its expecting an object so the error causes more errors  Grin
I think my understanding fails at the SQL code above it here:

Code:
$sql = "SELECT count(id) as id FROM shares WHERE id > $lastwinningshare AND username in ('".implode("','",$workers)."')";

I have the database set up properly, it has all the tables, pushpoold is working away I can create a worker (if I comment out the above code) and login and submit shares. Thanks for any help.

edit:
nevermind I found out it was because there was no $lastwinningshare I manually set it to 1 now everything is good (untill i find a block lol)

Can you please explain to me how you exactly fixed it ? I am still  a newbie learning the business Smiley

Edit : Solved it Cheesy
hero member
Activity: 556
Merit: 500
ok I almost have your pool up I have one sql issue thats causing the site to fail. I get
Code:
PHP Fatal error:  Call to a member function fetch() on a non-object in /var/www/simplecoin/includes/stats.php on line 276

So I google some and take a look at line 276, I see its under function usersharecount()
Code:
if ($currentSharesR = $currentSharesQ->fetch()) {

Apparently when the fetch fails it returns a false, and its expecting an object so the error causes more errors  Grin
I think my understanding fails at the SQL code above it here:

Code:
$sql = "SELECT count(id) as id FROM shares WHERE id > $lastwinningshare AND username in ('".implode("','",$workers)."')";

I have the database set up properly, it has all the tables, pushpoold is working away I can create a worker (if I comment out the above code) and login and submit shares. Thanks for any help.

edit:
nevermind I found out it was because there was no $lastwinningshare I manually set it to 1 now everything is good (untill i find a block lol)
full member
Activity: 210
Merit: 100
Sareea,

I really suggest that you dont even bother trying to start a pool simply because if a problem like this gets you stuck for more than two weeks you dont have the technical ability to run a pool.  There will be much larger day to day problems than this one that arise while running a pool.  Its not install and forget software.  You need to be able to program and understand the code because there will be problems and you will need to fix them yourself.  I dont mean to be mean but you are clearly not qualified to run a pool.  Im just being honest and trying to save you alot more pain down the road.
Pages:
Jump to: