Pages:
Author

Topic: ANUBIS - a CGMINER Web Frontend - page 13. (Read 83182 times)

legendary
Activity: 916
Merit: 1003
February 23, 2012, 07:03:11 PM
OK I figured it out finally.  In php.ini I had to enable sockets and enable short_open_tag.

Seems to work OK now.
legendary
Activity: 1795
Merit: 1208
This is not OK.
February 23, 2012, 06:57:36 PM
If your seeing actual code, and not errors, then your webserver is not understanding the page is a script and running it. It's just displaying as-is. Sounds like a config issue, which I can't really help with.
As for the database, you need to either set the username and password in the config file to one you know has access to the database, or add a new user to the database, to mach the one in the config file.
legendary
Activity: 916
Merit: 1003
February 23, 2012, 06:46:53 PM
Sorry for yet another php noob question.  I'm a software guy, just not web or database.  Tongue

I'm using wamp and it's definitely running correctly.  I have some sample php files working and I copied anubis into the correct directory.  I'm also positive I have the cgminer api running also.

When I surf to it with my browser at localhost/anubis there are a bunch of source code lines printed out in the header and body of the anubis page.  Clearly I don't have the database part configured right but I don't know where to look.  Also I don't know what to put in the config.inc.php file.
legendary
Activity: 1795
Merit: 1208
This is not OK.
February 23, 2012, 05:28:33 PM
Another update committed to use the new API function enable/disable pool and also tests for privileges; hides device controls if read-only.
full member
Activity: 125
Merit: 100
February 23, 2012, 04:15:09 PM
very cool, this replaces a few different tabs and windows.  donation sent =)
legendary
Activity: 1795
Merit: 1208
This is not OK.
February 23, 2012, 12:30:31 PM
PHP simply isn't working there. It's showing the script rather than running it.

See if you can google the problem. I'm afraid I'm not a php installation expert.
legendary
Activity: 1134
Merit: 1005
February 23, 2012, 10:25:36 AM
Using Wampserver on Win7.
My php.ini file
Code:
 short_open_tag
   Default Value: On
   Development Value: Off
   Production Value: Off

OP stated to set it to "enabled", but the ini file is showing "Default Value: On". Is the code above correct?
I've added the db and configured user/pass for it. When I open the webpage, it shows me a rendered page, but with a bunch of codes behind it.
Code:
$sql = "SHOW TABLES"; $result = mysql_query($sql); if (!$result) { echo "DB Fehler, konnte Tabellen nicht auflisten\n"; echo 'MySQL Fehler: ' . mysql_error(); exit; } while ($row = mysql_fetch_row($result)) { if ($row[0] == "configuration") $gotconfigtbl = 1; if ($row[0] == "hosts") $gothoststbl = 1; } if (isset($gothoststbl) && $gothoststbl == 1) { $result = mysql_query("SHOW COLUMNS FROM hosts"); if (!$result) { echo 'Konnte Abfrage nicht ausführen: ' . mysql_error(); exit; } if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { if ($row['Field'] == "port") $gotport = 1; } } if (!isset($gotport)) { $alterstrg = "ALTER TABLE `hosts` ADD `port` SMALLINT NOT NULL DEFAULT '4028'"; $alterres = mysql_query($alterstrg); if (!$alterres) { echo 'There was an error updating the database ! : ' . mysql_error(); } } } $sumactivegpus = 0; $sumgpus = 0; $sumhosts = 0; $sumtemp = 0; $sumdesmhs= 0; $summhs5s = 0; $summhsavg = 0; $sumrejects = 0; $sumdiscards = 0; $sumstales = 0; $sumgetfails = 0; $sumremfails = 0; //echo "c: $gotconfigtbl h: $gothoststbl"; if (!isset($gotconfigtbl)) { //echo "creating config-table"; include("configtbl.sql.php"); } if (!isset($gothoststbl)) { //echo "creating hosts-table"; include("hoststbl.sql.php"); } // <-- checking for tables $configq = mysql_query('SELECT * FROM configuration'); if (!$configq) { die('FATAL: MySQL-Error: ' . mysql_error()); } $config = mysql_fetch_object($configq); $result = mysql_query('SELECT name,address,id AS hostid,mhash_desired,port FROM hosts'); if (!$result) { die('FATAL: MySQL-Error: ' . mysql_error()); } ?> 
legendary
Activity: 4354
Merit: 3614
what is this "brake pedal" you speak of?
February 22, 2012, 09:08:46 PM
sent 1.33221100 to ya.

and again, thanks for the additional functions.

legendary
Activity: 1795
Merit: 1208
This is not OK.
February 22, 2012, 08:43:33 PM
Good to hear!

I'm not so proud as to refuse a donation Cheesy
1Fxpijq1NN52LzSzD2WtGbT3ZTWq366ejj

Thanks dude Smiley
legendary
Activity: 4354
Merit: 3614
what is this "brake pedal" you speak of?
February 22, 2012, 08:05:18 PM
So no more problems then?

I must be better than I thought Smiley

just got in; busy day.

it was a config error in php.ini, had zen tags (think that was what it was) enabled. disabled it and presto fired right up. changed some settings and the miners reflected them right away.

sweet! my life just got a bit easier Smiley

got a bitcoin addy? ill send ya  a coin.

legendary
Activity: 1795
Merit: 1208
This is not OK.
February 22, 2012, 07:03:53 PM
So no more problems then?

I must be better than I thought Smiley
legendary
Activity: 1795
Merit: 1208
This is not OK.
February 21, 2012, 09:29:08 PM
Might be more PDO stuff to fiddle with.

Find the apache error log, and see what it says.

Blank page could be a basic parsing error, that is a syntax error (i.e. missing ';' etc.)
legendary
Activity: 4354
Merit: 3614
what is this "brake pedal" you speak of?
February 21, 2012, 09:12:58 PM
grabbed the -bc20688 git.

copied the files over the old anubus 1.03 files in apache (win7), uncommented extension=php_pdo.dll, extension=php_pdo_mysql.dll in php.ini and edited the db name/password and set db_mysql to 1, the other to 0 (other stuff was OK) in config.inc.php.

fired it up...

and got a blank web page lol.

Im new to this web server stuff, so I must of missed something. Ill try again tomorrow with the latest git and double check everything again.

screenshots look great BTW.
legendary
Activity: 1795
Merit: 1208
This is not OK.
February 21, 2012, 07:29:21 PM
Just made a couple more minor changes.
legendary
Activity: 1795
Merit: 1208
This is not OK.
February 21, 2012, 02:34:49 PM
After getting ocminer's blessing, I've put it on github.
I really don't know what I'm doing with this, but it's here:
https://github.com/pshep/ANUBIS
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
February 21, 2012, 02:18:09 PM
Nope, that wasn't it.  Although I keep meaning to look into BAMT. 

Here it is: https://bitcointalksearch.org/topic/cgminer-web-monitor-beta-v08-58834

Ah I didn't think of jjiimm_64's coz he's discussing ANUBIS here on page 6 and 7 also Smiley
legendary
Activity: 1260
Merit: 1000
February 21, 2012, 12:50:06 PM
Nope, that wasn't it.  Although I keep meaning to look into BAMT. 

Here it is: https://bitcointalksearch.org/topic/cgminer-web-monitor-beta-v08-58834
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
February 21, 2012, 12:39:11 PM
Thanks P_Shep, that's fine, but you can create a new git and work on your branch and then if/when he comes back, request that he does a pull into the main branch.  That's what is nice about git - it lets you work on your own branch and lets other pull in the parts they want into their branches (or main trunk as the case may be)

Also - there was another web front end thingy floating around someone suggested merging with ANUBIS - I can't find that thread again, but it has some features ANUBIS was missing.  Does anyone know where that thread is?

https://bitcointalksearch.org/topic/m.760880
legendary
Activity: 1795
Merit: 1208
This is not OK.
February 21, 2012, 12:31:44 PM
You will need to use the previously added --api-allow and also use the new 1.2 change that I've just added to put a "W:" in front of IP addresses and IP address ranges that you want to allow to change cgminer (write/privileged access)

Basically the idea being that you can allow IP addresses to view cgminer but also restrict which IP addresses can change cgminer (or even allow none to)
One way you can test for this change is with the API version which will be 1.2
You can also test for privileged access with the new 1.2 command 'privileged'
... old versions of cgminer will give an error saying it doesn't exist, new versions will give an error if you don't have privileged access and a success message if you do have privileged access

I was thinking... having a web interface basically invalidates this, but then it's up to the admin to restrict access to the web interface. essentially 'SEP' Wink
legendary
Activity: 1795
Merit: 1208
This is not OK.
February 21, 2012, 12:29:03 PM
I see. I've used GIT occasionally for getting code, but don't really know how it works. I'll look in to it.
Guess I'll have to set a project up in place of OCMiner since he's not using git.
Pages:
Jump to: