robinp7720 / Blue-Stats-Minecraft

Ever wanted a stat interface for truly everything?
http://stats.mysunland.org/
Apache License 2.0
33 stars 14 forks source link

Many a errors after installation #17

Closed minegame30 closed 9 years ago

minegame30 commented 9 years ago

Hello! I downloaded the source code from here yesterday for BlueStats 3. I uploaded it to my webserver, navigated to the install directory and installed it all correctly. However, nothing then happens. I go back to the front page (http://stats.theendlessnet.uk/3/) and am presented with these errors:

Notice: Undefined index: lolmewnStats in /home/OurAcc/public_html/stats/3/classes/bluestats.class.php on line 91 Fatal error: Call to a member function getAllPlayerStats() on a non-object in /home/OurAcc/public_html/stats/3/plugins/lolmewnStats/modules/topPlayers.php on line 48

Within the Error.log which appears next to index.php, I see the above errors and nothing else.

robinp7720 commented 9 years ago

You have to enable the lolmewnStats plugin in the configs. Run this query:

UPDATE `BlueStats_config` SET `value`='["lolmewnStats"]' WHERE `option`='plugins' and `plugin`='BlueStats'
minegame30 commented 9 years ago

Okay, ill do that shortly. Where do I put the MySQL details from the Stats plugin? On the "install" page, it used different details. Is this at a later stage from where I am now?

minegame30 commented 9 years ago

I ran the query in PHPmyAdmin, and still the same errors occur when loading the page.

robinp7720 commented 9 years ago

All configs are in the BlueStatsconfig table in the mysql database. The lolmewnStats mysql settings are where the plugin column equals lolmewnStats. The mysql conifgs are prefixed with MYSQL in the options column

robinp7720 commented 9 years ago

and make sure that the plugins option is ["lolmewnStats"]

minegame30 commented 9 years ago

Okay, ill look into this tomorrow.

minegame30 commented 9 years ago

Okay, Im not sure which column you are referring too. I do not see any MYSQL_ prefixes in the BlueStats_config table. (See image)
image

robinp7720 commented 9 years ago

Simply opening the BlueStats webapp in the browser should create those rows

minegame30 commented 9 years ago

In your latest changes, I think you might have changed something within the install/MySQL system. I downloaded it and ran it just now in an attempt to try this again, and the webapp does not use the details the user enters on the install page. See below error: "Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'OurID'@'localhost' (using password: NO) in /home/OurID/public_html/stats/3/classes/plugin.class.php on line 47 There is an error with your theme: global.html not found " Despite the fact that I entered another host as opposed to localhost, and I entered a password. It said that the installation had completed.

Also, as you can see in the error above, the theme seems to be in an odd location. The site cannot find it.

robinp7720 commented 9 years ago

You probably forgot to set the "MYSQL_password" option. Also, new admin interface at /admin

minegame30 commented 9 years ago

Whats the username and password for the admin section? Where is that set?

minegame30 commented 9 years ago

And Im not sure where I am setting the MySQL password. Ive checked the file where it is stored and the details are all correct

robinp7720 commented 9 years ago

BlueStats Core mysql configs are saved in config.php Everything else is stored in the database. The default password and username is "admin". go to the lolmewnStats plugin and you will see MYSQL_host, MYSQL_username, MYSQL_password, MYSQL_prefix and MYSQL_databse

minegame30 commented 9 years ago

Okay, give me a few minutes, ill take a look

minegame30 commented 9 years ago

1) Logged into the admin section and this error: image 2) Yep, MySQL core details are correct. 3) A-HA! The configurations in the database have appeared! So can I just ask something, on the install page, are you meant to enter the details for your STATS database, or a different one specifically for BlueStatsWeb? 4) And theres still something up with the themes. the website will not load now... image

robinp7720 commented 9 years ago

You are supposed to enter mysql details for the BlueStats app not for lolmewnstats, though, it doesnt matter if they share the same database.

make sure themes/default/global.html exists and the themes option is set to default

minegame30 commented 9 years ago

Okay, thats what I did. Thats fine. Yep, the themes are there. Ill just check if MySQLnd is installed. Im sure it already is.

robinp7720 commented 9 years ago

The get_result function is part of mysqlnd, so its not installed.

minegame30 commented 9 years ago

Okay, Ill contact my host to see what they have to say. Ill let you know :)

minegame30 commented 9 years ago

Okay, Mysqlnd was not installed. My host are looking into installing it now. When it is installed, will the theme work accordingly?

robinp7720 commented 9 years ago

No, probably not. Make sure the themes option is set to (With quotes) "default"

minegame30 commented 9 years ago

A-HA! Right, progress. The config in the database was simply set to default, not "default" (there was no quotes). Adding quotes has fixed it and the site has burst into life. I assume installing mysqlnd will fix the following error aswell on the highscores page: Warning: Invalid argument supplied for foreach() in /home/OurID/public_html/stats/3/plugins/lolmewnStats/modules/highscores.php on line 34

robinp7720 commented 9 years ago

yes it should

minegame30 commented 9 years ago

Okay, ill let you know when its installed and if it works. Would you like me to write some basic install instructions for other users about changing the database config etc?

robinp7720 commented 9 years ago

For now that might be very useful! Although I do plan on making it much easier in the future

minegame30 commented 9 years ago

Sure thing, ill get on it tonight. :)

minegame30 commented 9 years ago

Added a section to the wiki. Consider linking to it in the readme file?

robinp7720 commented 9 years ago

Thanks!