Pages:
Author

Topic: mmcFE v2.1.23-stable - A Clean & Simple Pushpool frontend (PHP/BASH/JS/MYSQL) - page 4. (Read 25023 times)

full member
Activity: 210
Merit: 100
if you are missing the random block here and there you either need to upgrade or run your crontabs more often (i run mine every 60 secs).

For the other things you mentino... yuh those are all things on the todo list.   The hardcoded stuff is inherited from simple coin.  ive remarked things here and there as notes of stuff to redo properly later.    As with any software its always a work in progress.
newbie
Activity: 26
Merit: 0
Just a few questions about mmcFE..

I have a pool running that tends to neglect to pay out the odd block, which then causes me to have to do this manually.. there doesn't seem to be any pattern to when it does this..  Not just 1 specific user, time, etc.. Any ideas?  Paying out manually can become very time consuming..  Is there perhaps a way to set a round from paid out to not paid out in the sql database somewhere to have the cron job re-run to actually pay it out the next time through?

In your code you have specified the odd thing that says something like "DO NOT HARD CODE", yet its hardcoded anyways... Such as the block payout amount for BTC as an example..  Could things like that not be made a variable?

That way when a new coin fork comes out, a pool could very quickly implement it by changing a few variables and then they're off to the races without having to scour through many different php files to make those very same changes that the variables could really just deal with?


Thanks for a decent looking front-end though.. Smiley
hero member
Activity: 556
Merit: 500
ok google probably knows this but can I have two webroots?
newbie
Activity: 26
Merit: 0
Oh boy, running the stock template got me blamed for ripping off your site at mainframe..  More template options required! Smiley
full member
Activity: 210
Merit: 100
if you put it in a sub dir stuff might break but is probably fixable by making sure you change all the paths to your webroot+subdir
hero member
Activity: 556
Merit: 500
quick question, does this have to be in the root /www directory? or can I put it in sub dir?
full member
Activity: 210
Merit: 100
I probabaly would have just changed it in the bitcoin.inc.php file then you only had to change it once:

from:

Quote
public function __construct($scheme, $username, $password, $address = "localhost", $port = 8332, $certificate_path = '', $debug_level = 0) {

to:

Quote
 public function __construct($scheme, $username, $password, $address = "localhost", $port = 7332, $certificate_path = '', $debug_level = 0) {

But im lazy like that Smiley

Ill tag this as an improvement for later commit.  Thanks for all the input.
sr. member
Activity: 467
Merit: 250
one more problem found from having pushpoold up and running before mmcFE -- shares table is formatted differently....


Another interesting thing in the "shoot, that's broken" category... If your bitcoinD is NOT running on 8332, you're going to have problems.. Mine is running on 7332, and LOTS of pieces break on the web pages, as you can imagine.. Stats don't exist, the cronjobs all complain because they can't connect to bitcoinD. Even placing "x.x.x.x:7332" in the "rpcHost" field didn't fix it..

my fix?

update requiredFunctions.php to include an "$rpcPort" field:

Quote
$rpcType = "http";                              // http or https
$rpcUsername = "bigPHATuser";                             // username as specified in your bitcoin.conf configuration file
$rpcPassword = "bigPHATpass";                             // password
$rpcHost = "127.0.0.1";
$rpcPort = "7332";


then update all the cronjobs and web pages with the PHP bitcoinController call:

Quote
FROM :
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost);

TO :
$bitcoinController = new BitcoinClient($rpcType, $rpcUsername, $rpcPassword, $rpcHost, $rpcPort);


Voila!

sr. member
Activity: 467
Merit: 250
yeah i have all kinds of plans but just not enough time to get it all done Smiley  since the admin panel is for the smallest amount of viewers its sort of the last thing im working on tho.  im very comfortable at the command line so its not the highest priority at the moment... i built in some viewing features and made the tables sortable so you can get a good overview of whats going on in the database and for now thats enough for me but for sure more will come. Smiley

I appreciate all your hard work, after a little teething it seems to be up and alive.

As an admin, however, I'd like to see more detailed, "live" views on how "alive" the pool is at the moment.Things I may or may not want to expose to the other users, but things like most shares last (x) minutes per user, reject %'s, luck, etc... I have a little stack of queries I've been playing with, but PHP isn't my strength...  Right now the web interface is pretty "dead" in spite of all the activity going on underneath.

Maybe some of the "bitcoinD" things, like "getinfo" ?

Quote
Are you starting a pool? Smiley

Considering it, primarily private use, not trying to take on the big guys.. Smiley
full member
Activity: 210
Merit: 100
ahh thats another interesting one i hadnt thought of...

yeah i have all kinds of plans but just not enough time to get it all done Smiley  since the admin panel is for the smallest amount of viewers its sort of the last thing im working on tho.  im very comfortable at the command line so its not the highest priority at the moment... i built in some viewing features and made the tables sortable so you can get a good overview of whats going on in the database and for now thats enough for me but for sure more will come. Smiley

Are you starting a pool? Smiley
sr. member
Activity: 467
Merit: 250

As a exercise, I formatted my 10.04 LTS VM, and started over from scratch.. I'm back up with -almost- everything working... forgot about how long it takes for bitcoinD to download blocks... since it DOES tell you that when asked properly, it might be interested to at least throw some sort of smart error message in the webUI while that's happening:


Quote
root@pool3:~# bitcoind getwork
error: {"code":-10,"message":"Bitcoin is downloading blocks..."}

Sadly the log is full of messages like:
Quote
[Wed Aug 24 17:35:41 2011] [error] [client x.x.x.x] PHP Fatal error:  Uncaught BitcoinClientException:
rather than any useful message... ran me around in a circle for a while till I figured it out.

thanks again for your help.. here's hoping it's all working fine once the block download is done.


(any chance of any sort of user management in the admin panel at some point?)
full member
Activity: 210
Merit: 100
ahh right. that makes sense then.  Smiley
sr. member
Activity: 467
Merit: 250
tell me again what error you had with the cookie domain?  was it just simply set to the wrong address?

I had it set to several things OTHER than the IP address of the server, including "localhost.localdomain" and ".mydomain.com"

full member
Activity: 210
Merit: 100
tell me again what error you had with the cookie domain?  was it just simply set to the wrong address?
sr. member
Activity: 467
Merit: 250
ill get those tags fixed in the next couple revisions.   Good find... hopefully you can get it all working now...  wonder why that works without issues on my systems but not yours.  Must be the php.ini config or something apache related.  Odd one...

works fine without the changes on the ubuntu 10.04 LTS machine, so it's something unique to the Fedora setup. I hammered with grep till I found all the  "
might be worth while adding something like "I can't seem to log into the accounts it creates" - -to check the IP address under cookies.. I'm sure i"m not the only one who has tried this without a FQDN to test. Smiley
full member
Activity: 210
Merit: 100
ill get those tags fixed in the next couple revisions.   Good find... hopefully you can get it all working now...  wonder why that works without issues on my systems but not yours.  Must be the php.ini config or something apache related.  Odd one...
sr. member
Activity: 467
Merit: 250
This is your cookie domain define in requiredfunctions.  if its IP based,  set it like this:

$cookieName = "whateveryouwant";
$cookiePath = "/";
$cookieDomain = "192.168.178.31"; //Set this to your domain

after you have done this and you can login,  set your username in the db to admin by setting the admin table value to 1 instead of 0 for your username (in `webUsers`).  Then the adminpanel should show up for you.


I set the cookieDomain to the EXTERNAL IP address of the server, change the cookieName to something different, restarted the whole box, and -- -bingo -- I can log in.


update webUsers set admin = '1' where id = '1'; and I have an admin panel.

Financial Stats is a bit.... offended.. found another
Quote
Financial Statistics

0") or sqlerr(__FILE__, __LINE__); $sitewallet = mysql_query("SELECT sum(balance) FROM `accountBalance`") or sqlerr(__FILE__, __LINE__); $sitewalletq = mysql_fetch_row($sitewallet); $unconf_blocksQ = mysql_query("SELECT DISTINCT confirms from `networkBlocks` WHERE `confirms` < 120 AND `confirms` > 0"); $sitePercentQ = mysql_query("SELECT value FROM settings WHERE setting='sitepercent'"); if ($sitePercentR = mysql_fetch_object($sitePercentQ)) { $sitePercent = $sitePercentR->value; } $unconf_blocks = mysql_num_rows($unconf_blocksQ); $unconf_income = ($unconf_blocks * (50 * ($sitePercent / 100))); $usersbalance = $sitewalletq[0] / 1; $user_reserve = ($unconf_blocks); $donation_reserve = $settings->getsetting("tobedonated"); $balance = $bitcoinController->query("getbalance"); $subtotal = $balance - $usersbalance - $donation_reserve; echo "Current Block Number: ".$bitcoinController->getblocknumber()."
"; echo "Current Difficulty: ".$bitcoinController->query("getdifficulty")."
"; echo "
"; echo "Wallet Balance: ".$balance."
"; echo "Held for Users: ".$usersbalance."
"; echo "Held for Donation: ".$donation_reserve."
"; echo "Immature Blocks: " .$user_reserve. "
"; //echo "Pool Immature: " .$unconf_income. "
"; echo "
"; echo "Actual Liquid Assets: $subtotal
"; //echo "Forecasted Assets: " .($subtotal + $unconf_income). "
"; ?>

as is the "user control" section"

Quote
User Control

Search by IP Address, Userame, or UserId
Search String      

" .$num_results. " result(s)"; }?>





full member
Activity: 210
Merit: 100
try cleaning your cookies in your browser all of them if you have been changing the cookie name
sr. member
Activity: 467
Merit: 250
I cant imagine this would be it buit on the lines that are giving you errors change

Good catch! I changed that in header.php, and then leftsidebar.php and got a new message. Not sure what to do with it, but putting in the
Quote
Stats last updated:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /var/www/html/includes/leftsidebar.php on line 96 11:16:17 GMT-8   
(updated every 60 secs)

Maybe this is something that should come "TimeZone" from settings?


Thank you for posting the dependancies, on the F14 box I was short a few things, got those installed/updated..

Quote
Package php-cli-5.3.6-1.fc14.i686 already installed and latest version
Package php-common-5.3.6-1.fc14.i686 already installed and latest version
Package php-common-5.3.6-1.fc14.i686 already installed and latest version
Package php-common-5.3.6-1.fc14.i686 already installed and latest version
Package php-mysql-5.3.6-1.fc14.i686 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package php-gd.i686 0:5.3.6-1.fc14 set to be installed
---> Package php-geshi.noarch 0:1.0.8.8-1.fc14 set to be installed
--> Processing Dependency: php-mbstring for package: php-geshi-1.0.8.8-1.fc14.noarch
---> Package php-mcrypt.i686 0:5.3.6-1.fc14 set to be installed
---> Package php-suhosin.i686 0:0.9.29-1.fc13 set to be installed
--> Running transaction check
---> Package php-mbstring.i686 0:5.3.6-1.fc14 set to be installed
--> Finished Dependency Resolution

In the end, I still can't log in as a valid users who exists in webUser ... . I'm going to turn up php/apache logging and see if I can find the source.. this is driving me crazy:


full member
Activity: 210
Merit: 100
Quote

On both however, I'm up to where it's CREATING the users on registration now, but not allowing logins.. I suspect it's because it's on a private IP, being surfed from a private IP, so it's screwing up the cookie process. I can log in via mysql command line as the user/pass listed in the config file, make changes to the DB, etc.


This is your cookie domain define in requiredfunctions.  if its IP based,  set it like this:

$cookieName = "whateveryouwant";
$cookiePath = "/";
$cookieDomain = "192.168.178.31"; //Set this to your domain

after you have done this and you can login,  set your username in the db to admin by setting the admin table value to 1 instead of 0 for your username (in `webUsers`).  Then the adminpanel should show up for you.
Pages:
Jump to: