[Utility] Collection Analysis

Discussion in 'Card Hunter General Chat' started by neoncat, Feb 1, 2014.

  1. The problem with PHP is that it is almost impossible to tell what went wrong if you aren't the system's administrator. You can't see the files before PHP has done its magic (okay, no problem here as I know the files very well) and the (error) log is also kept secret. All I can do is describe the symptoms and deduce what might have happened.

    To give you some hints:

    If you open up the Cheat Sheet, there are a bunch of links in there to showcase the different filters. Those links point to the "Card and Item Query" tool. If you click such links, the query tool opens and the filter you clicked on gets inserted into the top text-box. This is done by PHP-code working on url-parameters (the "?id=xx&gender=m"-like things) and everything is fine. Another working PHP-code example is the signature badge on the top of each page (the dark gray one with the forum-link). This html-segment is inlined from an XML-file that is available locally.

    In contrast, all (!) tools that rely on the game server's csv-files aren't working because while loading those pages from your server the PHP-preprocessor is recognizing the PHP-code segments, removes them but replaces them with nothing (instead of the csv-file's content). If the PHP-preprocessor isn't completely messed up, the error log should mention why it wasn't able to load those files from the game's servers (probably a firewall/network issue). And this should be true for every single time someone requests one of the utils' pages, meaning there should be hundreds of errors logged (and you can trigger them yourself by loading the collection analysis for example, such that you know which time-stamp to look for). If the logs are empty perhaps restarting PHP could help.

    The weird thing here is, that there was a version, where this all worked right. And since then, the tools haven't changed significantly (at least in this aspect). So, if you haven't reconfigured your PHP-environment, I can't tell why this came up (now). At least my PHP-(development-)environment (that hasn't changed since the first time I used it) was able to correctly parse all tools. Otherwise, the non-dev version archive would be broken, too.

    If everything else fails (and assuming that it is - unfortunately - very unlikely that there will be many new adventures, card and items in the future) you could use the non-dev versions for those that rely on the server files. They are relatively easy to spot because the references to server files are always the last thing in each tool (pm me, if I should provide you a list). Sticking to the dev-versions for the remaining tools would be preferable. But that would also mean that auto-updates aren't possible anymore, sadly.
     
    Sir Veza and ParodyKnaveBob like this.
  2. Blizzrd33

    Blizzrd33 Kobold

    Is this still a chance of being resurrected?
     
  3. Sir Veza

    Sir Veza Farming Deity

    The stand-alone (non-dev) version still works.
    Note: I had to use Firefox to get PHP to run. I tried Opera, Chrome, and Iron, but they just opened the PHP file for editing. Possibly a setup problem on my machine, but once I found a fix I didn't worry further. If you have the same problem, it might be your fix.
     
    Blizzrd33 and ParodyKnaveBob like this.
  4. Blizzrd33

    Blizzrd33 Kobold

    Thanks heaps for this, I also had tried other browsers with no success but have it working now with Firefox.
     
    Sir Veza likes this.
  5. Hey Blizzrd and probably others with the same question,

    I can understand that you would like to have the working tools back, but I'm not in the position to accomplish this. As far as I know (or think) the tool's code is perfectly fine and the problem is "somewhere" in the hosting. So if Stexe (or someone else) tells me that there is in fact some error in the tool's logic I'll fix them but until then I - as the tool's coder - am incapable of improving the current situation.

    You can always use the non-dev version - like Sir Veza said - but this obviously isn't the perfect solution either. For example you'll have no auto-updates there, too (sure, no big deal given that the last new item is several months old). But other aspects won't work either. And that the tools only work with Firefox proves me right to use and stay with Firefox for years now. ;)

    If someone else volunteers to host the tools on their site, I'll do my best to help with this as far as I can. But - honestly - I doubt that besides Stexe there will be someone else willing to - sorry for the term - waist bandwidth and memory for tools related to an almost dead game (at least this is my opinion but we'll see whether we get any sessional events (Birthday, Halloween, Christmas) this years, if not - again - I have very little hope).
     
    Sir Veza likes this.
  6. Sir Veza

    Sir Veza Farming Deity

    Have you tried it with any browsers other than Firefox? I understand not having too many browsers installed, which is why I use a portable copy of Firefox on an external drive to run your utils.
    Thanks again for your work!
     
  7. Thanks to not being a professional Web developer I have the option to choose my browser freely and I make use of this choice. I don't have/use IE and Edge as they are just not worth the time (I'm an adult and want to have options to configure stuff and want to visit any web pages without the browser telling me that Microsoft missed some browser features to properly display and run this particular page; at least this is the image those two have). I don't have Chrome because I never really trusted Google and have even recently stopped to use Google's web search most of the time. I do have Opera and use it because on my system flash runs a bit more smooth there sometimes. I don't even use an official Firefox anymore but a fork. And Safari is no real option to me simply because of Apple. And I don't try out every single one of the new browsers that come into existence, I guess no-one has this time.

    Therefore, I can tell that Opera should work (at least my old version 44 does when I drag and drop the index page into it). But given that the tools won't change much in the near future (at least I guess so) there is always the possibility to make the files more "browser-friendly": First, rename all files from ".php" to ".html". php-files are only in the root-directory and in one additional level so if you open a folder and don't see php-files, you don't have to go in any deeper. After that open every former php-file and replace all occurrences of ".php" with ".html". Notepad++ is capable of processing whole folder trees at once. After that what you got are proper web page formats and even double-clicking the index page should immediately open up your browser. In this stage every browser should behave correct.

    If you don't make use of the index page but load every tool directly from file, you could omit the second step and stop after renaming the files themselves. But be warned that clicking some links might cause error messages then.
     
    Last edited: Jul 18, 2019 at 5:12 AM
    nchan090124 likes this.
  8. ParodyKnaveBob

    ParodyKnaveBob Thaumaturge

    Hm. I've never seen a browser choke on a file just for having the .php extension - and by never, I mean in the last couple decades where it's relevant, lol. I'll be interested to hear if that makes a difference for anyone.
     

Share This Page