While I will preface this with staying I think I’ve thought of a solution to this - it is long and drawn out and something I’d rather not have to do, so I’m asking if there are other solutions.
Background - in 2008 my subdomain was hacked, via a very old copy of MT; as a result, much of my directory suffered attack, including EE files. I was running 1.6.3 at the time. I got most of the EE files cleaned up (or so I thought), and then stopped using that blog for a while. However, I don’t think I tested the functionality of the pages after that, or maybe I did (can’t remember), and in the interim, leftover “unclean” files continued to do some damage. When I started working on this over the weekend, I discovered that ALL of the PHP files in my EE directory had the following code at the beginning of each one:
<? /**/ ?>which I came to the conclusion, potentially nullifies any code following it. I cleaned up by doing the upgrade to 1.6.9, deleting the pre-existing 1.6.3 EE files (except some noted further below).
I decided I wanted to upgrade to 2.0, but wanted to get my site working under 1.6 first. I had skins running successfully before the attack, and everything else worked perfectly. Now though, my index file seems to be the ONLY thing that loads under my main weblog. If I click comments, archives, categories, another of the skis, etc, it all just reloads my index page, with the default skin. I even tried deleting the contents of my index template, and everything STILL loads what was there before—all of the content of the first page. Seriously, I could type “what’s up doc” in the template and it will still show some seemingly cached content from my original template. Yes, I’ve deleted EE Cache, and my browser’s. It does the same display in a browser that I don’t think has ever even visited that site.
I have a lot of templates in that weblog “channel”. I have not looked at every one of them, and since I cannot access the CP from work at the moment (login issues with cookie domain), I cannot recall if any were ever saved to the server. Even if they were not, is it possible one of them is corrupted in the database, causing this seemingly irreparable issue?
I think the way I can fix it is to delete all of templates within that weblog and the weblog itself, and create a new one, because when I change to a different weblog, the problem *seems* to go away - the other weblog’s content and templates load ok. I haven’t tested it enough to know if the comments and other links work from a different weblog, so I could be wrong in thinking the problem doesn’t exist in the other ones. But if they do work and creating a new weblog to replace this one is the fix, I was hoping there was some shorter method to fix it than that.
I did upgrade it to 1.6.9 and the problem persists, but I want to fix it before I do the final upgrade to 2.0, since I have a feeling the problem will probably follow and not be magically fixed in an upgrade (as it was not when going from 1.6.3 to 1.6.9).
So is it possible I have a corrupt file or two in my database? When I did the upgrade from 1.6.3 to 1.6.9, I deleted everything in my directory except for config.php & config.php.bak, and the images directory, and my skins directories (after cleaning up those php files beforehand). But I did not do anything with the database itself.
I have at least two or three years of posts in that blog so I’d really like to avoid purging the whole thing. If it comes to that, is there a different export method than a database dump, which could potentially save corrupt files and I’d be back at the same issue after a refresh? I suppose I could probably select only the posts and comments, maybe categories, in a database dump, and hope none of those are corrupt.. And speaking of which, how does one determine if a database entry is corrupted?
Thanks and sorry for the long post.