[WEB]Beautiful Monitoring

Discussion in 'Bukkit Tools' started by Revi, Jan 12, 2013.

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

    theearlypc423

    I agree! And the only reson people hate php is because it is too hard for them. If you use it correctly it runs smoothly! Now ruby is the bad one.
     
  2. Offline

    CayleRose


    lycano
    I believe I am doing everything correctly, even marked the cache folder as 777. it just says "offline" when my server is online.
    Have a look and tell me if you see anything wrong.

    Config:
    [​IMG]


    Code:
    [​IMG]


    Files:
    [​IMG]


    Outcome:
    [​IMG]


    Yes, its online:
    [​IMG]
     
  3. Offline

    bitWolfy

  4. Offline

    lycano

    Just checked with default xamp installation. Works for me.

    Well not quite. It does not show the max amount of players. Only kii is shown. But the currently connected player display works. Would have to check if xamp has the correct libs installed for this.

    At home i checked it with a 1.4.6 server. What version do you run?

    Anyways i quickly checked the connection packet and found out that the currently connected player count and the max player count has moved to the end of the data.

    Check out the fixed version. Let me know if this works for you.

    http://pastebin.com/kLS0wqks

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

    Sushi

    So basically you're saying you should use a language like PHP that develops code more slowly and more difficultly than using a framework like Rails, just because?

    You're essentially saying PHP is harder than Ruby in your post. And no, that's not why I hate it. But if you're saying PHP is harder, why use it?
     
  6. Offline

    lycano

    Sushi theearlypc423 would you please click on "Inbox -> Start a new conversation" and fill the names box with someone who actually is interested in what you say? This thread is not about your likes and dislikes. Please don't continue talking offtopic here.

    If you have something to contribute please feel free to do so but if not please start a conversation or find those posts where you can yell at each other about your likes and dislikes.
     
    CayleRose likes this.
  7. Offline

    bitWolfy

    > PHP
    > Hard
    Are you sure that we talking about the same language?

    Sushi The things in the post you sent me may be true. Whoever wrote that article probably knows more about the language than me. However, I do think that these points are somewhat exaggerated. Once again, they might be true, but they do not make the language unusable. Especially so for tiny projects like the one outputting the number of players online on a Minecraft server.
     
  8. Offline

    CayleRose

  9. Offline

    bitWolfy

  10. Offline

    lycano

    CayleRose i did checked it via xampp and adapted it so it works with your server too. So it should work out of the box after changing the IP Address. Also i would recommend using default png image instead of jpg.
     
  11. Offline

    Sushi

    There's already a thread for this, that I made to prevent situations like this. I'm not sure why theearlypc423 is trying to instigate an argument in this thread.
     
  12. Offline

    lycano

  13. Offline

    bitWolfy

    lycano Did you even test that? You got a syntax error on line 288.

    You cannot do $this->getFileList()[0], it is going to complain.
     
  14. Offline

    lycano

    bitWolfy of course not, why should i test the code i write? Anyways: Depending on your configuration you can do this. For example with an xamp default installation you can.

    Anyways this version should do just fine as i checked it on a default apache installation.

    http://pastebin.com/7vYekJsh

    Also make sure that the cache folder has write permission. Otherwise the cache would not work and a new image would always be generated.
     
  15. Offline

    Gravity

    Wait... what? Was that a joke?
     
    KeybordPiano459 and lycano like this.
  16. Offline

    lycano

    Gravity does my avatar look like a dogs face? ;)
     
  17. Offline

    Gravity

    Don't kid about that. The number of people on these forums who think that way is too damn high as it is.
     
  18. Offline

    lycano

    Gravity well then, thanks for the hint. I thought it would be perfectly clear that you always check your code before publishing.

    Also you may be interested in this https://github.com/redwallhp/MCServerStatus

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

    theearlypc423

    Php is easy if you know how to use it. And I can almost guarentee the reason sushi hates it is because he has failed with it. You have to know a language before you use it. I know php and it's simple!
     
  20. Offline

    bitWolfy

    theearlypc423 And I can guarantee that Sushi did not "fail with it".

    Anyways, this is offtopic. Let's talk some more about

    Because I can't get it to work, even @lycano's version. As far as I know, I have installed it correctly, have PHP installed and running, and my server is definitely online. Is there something else that can affect it?
     
  21. Offline

    lycano

    bitWolfy so you are telling me that this:

    http://pastebin.com/7vYekJsh

    does not work for you? What PHP version do you have installed?

    You can check that by creating a file called phpinfo.php and fill it with <? phpinfo(); ?>
     
  22. Offline

    bitWolfy

    lycano Nope, it's not working for me for some reason. Take a look. I am running PHP 5.2.17.

    This is what the configuration section looks like:

    configuration (open)
    PHP:
    error_reporting(0);
     
    $config['host'] = 'mc.wolvencraft.com';
    $config['port'] = 25565# port
    $config['folder_name'] = 'cache';
    $config['time_update_cache'] = 60;
    $config['offline_message'] = 'offline';
    $config['file_type'] = @$_GET['t'];
    $config['keep_files'] = 30;
    $config['debug'] = false;


    I did chmod 777 on the cache directory, naturally.
     
  23. Offline

    lycano

    Works on my webserver. Just changed the host to your config and it shows me 0/50.

    Maybe you would have to use t=jpg or gif as you may not have the correct GD Libs installed. If jpg works you would have to check your servers gd lib.

    checkout http://www.php.net/manual/en/image.requirements.php

    Also this can be checked with phpinfo call section gd. I guess you may have not enabled png support or you dont have the required lib installed.

    If not you may have to disable error_reporting by commenting it and see what the error.log says.
     
  24. Offline

    CayleRose

    still says Offline.
     
  25. Offline

    lycano

    CayleRose could you please post me the GD section and PHP Version when using phpinfo?
     
  26. Offline

    bitWolfy

    lycano I do have GD enabled, and I used it before just fine. And no, it does not work with any of the file extensions available.

    I am running a bundled version of GD (2.0.34 compatible). I have GIF, PNG, and JPG support enabled for it.

    Are you 100% positive that there are no other factors that can affect this script?
     
  27. Offline

    lycano

    bitWolfy well, idk it works well on my server debian 6.0 with latest php and apache installed. Works on default XAMPP install too (PHP 5.4) .. anyways again it should show you the problem in the error.log after commenting error_reporting(0). Without an error.log everything is just guessing.
     
  28. Offline

    bitWolfy

    lycano Apologies! I forgot to post it. <_< Doubt that it'll help you, though.

    PHP:
    [01-Feb-2013 08:23:47PHP Warning:  fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to mc.wolvencraft.com:25565 (Connection timed outin /home/wolvencr/public_html/status/index.php on line 108
    [01-Feb-2013 08:23:47PHP Warning:  Cannot modify header information headers already sent by (output started at /home/wolvencr/public_html/status/index.php:108in /home/wolvencr/public_html/status/index.php on line 489
     
  29. Offline

    lycano

    As for CayleRose seems i would have to add some additional debug output as it seems that the connection could not be made. Maybe try to set debug to true and check if fsock_open would give you some warnings in the error.log

    bitWolfy that error means that for some reason the packet does not come back. I doubt it would help if you use the IP as you get a connection timeout meaning sending works but receiving doesn't.

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

    bitWolfy

    lycano Not even sure what to tell you, except for the fact that other services similar to yours do not work either.

    In either case, not like it really matters. I'll find a different solution to this.
     
Thread Status:
Not open for further replies.

Share This Page