[INACTIVE][ADMN/SEC/WEB] DataLog - replaced by HawkEye [1000]

Discussion in 'Inactive/Unsupported Plugins' started by oliverw92, Apr 15, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    oliverw92

    Vaupell, Pinkpixels, Sleaker and 2 others like this.
  2. Offline

    MatCat

    Yes it is the same DB
     
  3. Offline

    szmc

    Theres no attribute there, so i guess it has no data in it.
     
  4. Offline

    skkeeper

    Installed DataLog today on my server and already love it. I'll probably do a little webui for my own with graphs and stuff like that.

    Just one problem, your WebUI doesn't work well with internacional characters, I've fixed this by adding a simple line to SearchDB.php:

    PHP:
    <?php
    //After
    $sql .= implode(" AND "$whereArr) . " ORDER BY dataid DESC";

    //Put this
    mysql_query("SET NAMES UTF8");
     
    //Before
    $result mysql_query($sql);
    ?>
    Simple fix I hope you include in your next version.
    Thanks and keep up the good work.
     
  5. Offline

    oliverw92

    Thanks keeper, i'll add that to the feature list.
     
  6. Offline

    JayFight

    Okay so i'm a bit of a n00b in things like MySQL and such and i was trying to follow the install instructions and got lost somewhere so if you have the time at some point is there anyway you can work up some n00bified instructions for people who have no idea what info to put in for #4 and 6 or how to do #7 also maybe a little more info on how to access it.

    I thank you for at least considering this.

    btw i'm running my server directly from my home comp so if that changes things ......
     
  7. Offline

    oliverw92

    Ok first off, do you a) know what a web server is and b) have one on your home comp?
    If the answer is no, then I suggest download WAMP: http://www.wampserver.com/en/ - it is very simple apache (webserver), mysql and php package that includes tools like phpMyAdmin for keeping your database in order. Even if you have MySQL installed already, you can still install this package - it won't interfere. Once you have this setup, make sure WAMP is running (you can set it to auto-start with windows in its config).

    Once WAMP is running, click on its icon in the right of your windows startbar and click on phpMyAdmin. This is a database browser. Create a new database called 'datalog'.

    In step 4, you need to configure config.yml. If you have just installed WAMP and haven't changed any MySQL information except for creating your database 'datalog', you can use the following config:
    The URL is fairly self explanitory. localhost is where your MySQL server is hosted. If it is hosted remotely, you put the IP or address of where it hosted. 3306 is the default MySQL port - 99% of MySQL servers run on 3306. datalog is the name of the database you want to store the info in.

    In step 6 you need to open up the file mysql.php with something like Notepad or Notepad++ and edit in your MySQL details into the config array. Here is the default mysql.php:
    Code:
    <?
        $config = array(
                        "dbHost"  => "localhost",
                        "dbDbase" => "datalog",
                        "dbUser"  => "root",
                        "dbPass"  => "",
                        "dbTable" => "datalog"
                        );
    
        $con = mysql_connect($config["dbHost"], $config["dbUser"], $config["dbPass"]);
        if (!$con)
            die("Could not connect to MySQL Database!");
        if (!mysql_select_db($config["dbDbase"], $con))
            die(mysql_error());
    
    ?>
    If you followed my steps above for WAMP, you can use the default config file.

    In step 7 you need to upload/place the Web Interface files in your web server public folder. For WAMP, you can click on its icon and then click on 'www directory'. This is where you place documents that you want to be on your webserver. Note that these will be accessible on your local network at the address of your computer if you go to it in a web browser, and also if port 80 is forwarded to that computer, people from the outside will be able to access your websites. Place the Web Interface in this area.

    You can now access the logs by going to http://localhost in your web browser, or using your external IP if you have port 80 forwarded to the computer with the web server on.
     
  8. Offline

    szmc

    do you know why it is not finding any worlds?
     
  9. Offline

    JayFight

    you sir (ma'am?) are awesome i didn't expect such a fast reply i thank you.

    now i just have the same problem as szmc
     
  10. Offline

    oliverw92

    Is there any data in the table that the interface is set to read from? Do you use bigbrother?
     
  11. Offline

    szmc

    I do not use Big brother, and in the datalog table it says "world" is "zero". Also this
    Code:
    world . '">' . $row->world . ''; ?> 
    is standing in the top left corner of my DataLog Browser.
     
  12. Offline

    oliverw92

    You should be able to browse data in MySqlAdmin, i don't use it though so I wouldn't know. If you know how to run queries on the database using MySqlAdmin, run this:

    Replace database and table with whatever you have them set to in config.yml

    Using phpMyAdmin (I assume you followed my instructions to use WAMP and therefore have phpMyAdmin), check if there is any data in the table you set logblock to log to. Also double check that your mysql.php is configured to the right database info.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  13. Offline

    szmc

    it gives me a number.
    I can read the Data now, but only in MySqlAdmin. So the problem is the web Browser.
    How do i have to enter the config. there? could u post an example?
     
  14. Offline

    Techcuron

    I have download the MySQL, but it still won't work.
    And no I don't have big brother or any other plugins that use MySQL

    Code:
    14:59:07 [INFO] [DataLog] Version 0.1 disabled!
    14:59:07 [SEVERE] null loading DataLog v0.1 (Is it up to date?)
    java.lang.NullPointerException
            at uk.co.oliwali.DataLog.DataLogDB.checkTable(DataLogDB.java:99)
            at uk.co.oliwali.DataLog.DataLogDB.<init>(DataLogDB.java:31)
            at uk.co.oliwali.DataLog.DataLog.onEnable(DataLog.java:48)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:578)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:216)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:115)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:93)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  15. Offline

    oliverw92

    I said how to in this post: http://forums.bukkit.org/threads/ad...g-of-your-server-677.13048/page-3#post-222488 see the section where you edit 'mysql.php'. Post your mysql.php, commenting out the password.

    You are missing an error above that - there should be another one about MySQL.
     
  16. Offline

    szmc

    Code:
    <?php
        $config = array(
                        "dbHost"  => "localhost",
                        "dbDbase" => "ni5208_1_DB",
                        "dbUser"  => "ni5208_1_DB",
                        "dbPass"  => "",
                        "dbTable" => "datalog"
                        );
    
        $con = mysql_connect($config["dbHost"], $config["dbUser"], $config["dbPass"]);
        if (!$con)
            die("Could not connect to MySQL Database!");
        if (!mysql_select_db($config["dbDbase"], $con))
            die(mysql_error());
    
    ?>
    User and DB is the same.
     
  17. Offline

    oliverw92

    So the database is hosted on the same computer/server as the webserver?
     
  18. Offline

    szmc

    yes.
     
  19. Offline

    Tjodd

    I tried this plugin but java.exe just got mad and stole all of the cpu, and caused the server to lag extremely. Turned the plugin off and everything went smooth again. Is my server too weak, or is it just a startup phase? Everything local btw.
     
  20. Offline

    Phinary

    ETA on 0.2? i cant wait :p
     
  21. Offline

    oliverw92

    If DataLog is logging to that table ok and there are no errors at all, then i have no idea! Sorry :( Maybe subsequent versions will work for you.

    Interesting! I don't see why it would do that - I use a very similar database access method to LogBlock and BigBrother ( I queue up entires before submitting them). What are your server specs?

    Going to start work on it now!
     
  22. Offline

    Phinary

    So like maybe by friday? :)
     
  23. Offline

    oliverw92

    Most likely tomorrow :) I'm moving over to Bukkit Persistence for the database access. This should get rid of loads of errors that can occur. This will be the main feature of v0.2, following that will be the chat filter. Issues/events occurring from this will be as follows:
    • You will no longer be able to configure the table name - it will be restricted to datalog. I will attempt to make it so the plugin imports old data if you have been keeping it in a different table name, but i'm not sure if its possible with bukkit's persistence system, and I don't really want to have to rely on a whole extra mysql library to do something that people can achieve with a single MySQL query.
    • No more delay configuration - Bukkit's persistence system has buffering built into it so there will be no need for me to create my own timer to add items to the database.
     
  24. Offline

    Tjodd

    Yeah, sorry about that, should have included that info. :)
    It's a Dual Core 6300 with 6GB RAM, but it's a user/bukkit issue. I tried another plugin and instead of restarting the server I tried reload a few times and same thing happened. Sorry. :)
    Looking forward testing next update.
     
  25. Offline

    oliverw92

    Ah ok, you had me worried then!

    IP logging will now be properly possible with bukkit 684 - there is now a pre-login event which properly gives you the IP :D
     
  26. Offline

    iffa

    Hm - I contacted my webhosting and asked whats the hostname / IP to connect to the MySQL remotely - still no luck...
    url: jdbc:mysql://xxxx.a.hostable.me:3306/axxxxhos_minecraft
     
  27. Offline

    oliverw92

    No errors or anything?

    I've just finished redoing the entire database system so it now uses bukkit's own persistence system. I've also added in options to turn off logging of certain things.

    Should be releasing v0.2 soon.

    Version 0.2
    0.2 [684] -> jar only
    • Implemented password protection (look in config.php)
    • Moved to Bukkit Persistence for database access
    • Added 'command filter' to config.yml - stop logging of certain commands!
    • Added 'log' list to config.yml - disable logging of certain events
    • Added UTF-8 database compatibility
    • mysql.php is now config.php
    • v0.1 database is NOT compatible with v0.2 database!
    If you are upgrading, you will pretty much need to do a fresh install of everything. The database info is now configured in the file bukkit.yml. Please read the op for more information.


    How to convert v0.1 database to v0.2:
    1. Run this query:
    2. Run this query:
    3. Install DataLog v0.2 following the instructions in the op
    4. Run the server, then shut it down
    5. Run this query:
    6. Run this query:
    7. Run this query:
    8. Start your server
    That should backup the data, make the server create a new table, then copy the backup into the new table, then delete the backup.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  28. Offline

    Phinary

    Awesome! Question though... does the login system support multiple accounts
     
  29. Offline

    oliverw92

    If you mean the password for the log viewer, no. Why would you need multiple accounts?
     
  30. Offline

    Phinary

    So if one of my staff members gets fired, I don't need to change the password
     
  31. Offline

    oliverw92

    That would be a rather complex system for something that would be much easier solved with a password change. It is a good idea to change passwords for things like this regularly anyway.

    I mean you would have to set up accounts and passwords for every single staff member - would be a lot of effort on the server owners behalf.
     
Thread Status:
Not open for further replies.

Share This Page