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

Base plugin does not exist: #103

Closed krustymk closed 6 years ago

krustymk commented 6 years ago

Base plugin does not exist: Please install this plugin or change the base plugin

Plugins required ticked and database entries all filled out, tried several times but always get the above pic1 pic2

robinp7720 commented 6 years ago

Sorry for the long wait. I'm busy with other projects right now. I'll check the installer once I've got time but the base_plugin option is probably not set. Try running the following query on the BlueStats database:

INSERT INTO `BlueStats_config` (`row_id`, `server_id`, `option`, `plugin`, `value`) VALUES (NULL, '1', 'base_plugin', 'BlueStats', '\"Statz\"');
krustymk commented 6 years ago

There was no base_plugin, after adding the line i just get a blank page 2017-12-26 2

ultimate255 commented 6 years ago

Even after adding base_plugin, I just get an error 500.

krustymk commented 6 years ago

Coming up to 3 months, do you plan to fix this?

robinp7720 commented 6 years ago

Since I am unable to reproduce this bug I do not know how to fix it. I have already made some fixes to the install script so a base plugin is set on install. The 500 may also occur if any of the paths specified in the config are incorrect, being the view and plugin paths.

.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c5 5493e4bb","name":"GitHub"},"entity":{"external_key":"github/robinp772 0/Blue-Stats-Minecraft","title":"robinp7720/Blue-Stats- Minecraft","subtitle":"GitHub repository","main_image_url":"https://c loud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6- 95fc- 7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent .com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed- b52498112777.png","action":{"name":"Open in GitHub","url":"https://gi thub.com/robinp7720/Blue-Stats- Minecraft"}},"updates":{"snippets":[{"icon":"PERSON","message":"@krus tymk in #103: Coming up to 3 months, do you plan to fix this?"}],"action":{"name":"View Issue","url":"https://github.com/robi np7720/Blue-Stats-Minecraft/issues/103#issuecomment-366167834"}}}

krustymk commented 6 years ago

So from that can i assume that the paths are automatically set? When you are attempting to reproduce this are you using the structure 'websitefolder/stats/' so the path is website/stats/ or something different? Do you have a working demo installed from the same download we have available? Are there any settings not covered in the install procedure Are there any requirements not mentioned during the install procedure? Is .htaccess editing required?

I noticed your demo uses a sub domain, have you confirmed it works in the form website/stats/ aswell?

Thanks for your help

robinp7720 commented 6 years ago

My local test setup is located within a sub directory of the web server root, so that shouldn't be a problem. I have also just attempted to install BlueStats locally again into a subdirectory which worked without extra intervention. The htaccess file provided also works for the most common setups which includes in the server root and in a sub directory.

All settings are handled by the installer apart from creating the config.json file if it doesn't have the write permissions. There might be dependancies which I don't know about, those should however show up in the webserver logs.

Did I never ask for those logs? Could you send the last 5 lines of the web server log?

krustymk commented 6 years ago

Brand new install, only renamed install directory, all green ticks during install

[Sat Feb 17 03:36:03.089044 2018] [mpm_prefork:notice] [pid 1353] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2l configured -- resuming normal operations [Sat Feb 17 03:36:03.089057 2018] [core:notice] [pid 1353] AH00094: Command line: '/usr/sbin/apache2' [Sat Feb 17 10:42:10.341806 2018] [:error] [pid 21478] [client 5.67.34.142:52084] PHP Notice: Undefined index: plugin in /var/www/html/NamelessMC-0.4.1/stats/admin/advanced/parts/plugins.php on line 46, referer: https://theamigos.co.uk/stats/admin/index.php [Sat Feb 17 10:42:10.341879 2018] [:error] [pid 21478] [client 5.67.34.142:52084] PHP Notice: Undefined index: plugin in /var/www/html/NamelessMC-0.4.1/stats/admin/advanced/parts/plugins.php on line 46, referer: https://theamigos.co.uk/stats/admin/index.php [Sat Feb 17 10:58:56.237870 2018] [:error] [pid 21256] [client 5.67.34.142:59997] PHP Notice: Undefined index: plugin in /var/www/html/NamelessMC-0.4.1/stats/admin/advanced/parts/plugins.php on line 46, referer: https://theamigos.co.uk/stats/admin/index.php [Sat Feb 17 10:58:56.237938 2018] [:error] [pid 21256] [client 5.67.34.142:59997] PHP Notice: Undefined index: plugin in /var/www/html/NamelessMC-0.4.1/stats/admin/advanced/parts/plugins.php on line 46, referer: https://theamigos.co.uk/stats/admin/index.php

robinp7720 commented 6 years ago

There are no errors there which relate to the actual interface. The error on the actual site however say that Statz is not installed within BlueStats. That is a problem I believe I have fixed around month or two ago. Could you delete the BlueStats config table and everything related to the BlueStats interface and attempt a fresh install?

krustymk commented 6 years ago

My site is https Just spotted this is not detected in the stats admin section, not tried altering this yet as im out

krustymk commented 6 years ago

Still the same, tried https tried a sub domain that is plain http.. the same always getting a 500

robinp7720 commented 6 years ago

Please create a file named fixInstall.php in the root of BlueStats and insert the following content:

<?php
require "classes/config.class.php";

$config = json_decode(file_get_contents("config.json"), TRUE);

$mysqli = new mysqli(
    $config["mysql"]["host"],
    $config["mysql"]["username"],
    $config["mysql"]["password"],
    $config["mysql"]["dbname"]
);

$config = new config($mysqli, "BlueStats");

$config->set("MYSQL_host", "localhost", 'Statz');
$config->set("MYSQL_username", "root", 'Statz');
$config->set("MYSQL_password", "password", 'Statz');
$config->set("MYSQL_database", "Statz", 'Statz');
$config->set("MYSQL_prefix", "statz_", 'Statz');
$config->setDefault("base_plugin", 'Statz');

$config->set("MYSQL_host", "localhost", 'McMMO');
$config->set("MYSQL_username", "root", 'McMMO');
$config->set("MYSQL_password", "password", 'McMMO');
$config->set("MYSQL_database", "mcmmo", 'McMMO');
$config->set("MYSQL_prefix", "mcmmo_", 'McMMO');

After you have created the file, open it in your webbrowser and set the correct details in the admin page of BlueStats.

robinp7720 commented 6 years ago

Turns out this was a problem when using chrome to install BlueStats. Removing a redudant check if the checkbox was selected solved this :)

krustymk commented 6 years ago

Cool, glad you got it sorted :)