Sat 7 Jul 2007
Some days I just shouldn’t touch a keyboard…
Posted by chris under Geek Stuff
OK, this is going to be another one of those posts that you might just want to skip over if you are not on the geeky side…
We’ve got a new computer (more on that later) and I am getting all the apps installed on it that I work with on a regular basis; somehow or another while trying to find the link for the Gallery Remote software I that I use to upload photos, I noticed on the home page of the critterweb.com site that the links at the upper right were broken. “Hmmmm…” I thought;Â I knew they originally worked, but couldn’t remember if I ever tested them after that last upgrade.
A quick bit of testing (I noticed that the Gallery link worked, and the other links worked if I clicked on the Gallery link first) pointed in the direction of a bad URL. There was an extra directory level specified there that didn’t need to be, and so it was going to my 404 page which also appeared to be broken and was generating a nasty PHP error.
About a half hour of research on Google, the download of a text editor that highlights syntax in code, and some scrutiny of the page in that editor revealed an extra single quote where there should not be one. Simple enough — that fixed the 404 page.
Next I tackled the bad URL… I went into the Options page of WordPress without really thinking about what I was doing, and pulled the ‘extra’ directory out of my WordPress site URL. Even as I clicked the Update button, a warning bell went off that I had just committed a major ‘oops’ but it was already too late to take it back. I now had no way to re-edit that page, as the WP_Admin folder was now unresolvable, the style sheet and header files for the site were also missing resulting in a garbled mishmash of text, and on top of all that, my smart-ass 404 page — which basically says something to the effect that the page was not found because Chris is an idiot (which in this case was true I guess!) — now appeared at the top of the mess.
I poked through the site’s configuration files and there was no way to change the ’siteurl’ value there, some more research led me to instructions on how to change it directly in the MySQL database, which meant I had to hunt down my Control Panel login info because I hadn’t installed SQLYog on this machine yet. Once I got in (and did a precautionary SQL dump before getting my happy little fingers into the tables) it was easy to fix. The site was now back the way it should be… sort of. The problem was that I then I realized that an image link was broken on one of the previously unviewable pages, another undetected casualty of the upgrade last month, I am guessing.
So… some more time gets wasted hunting down another copy of the file in question and uploading it. Then I load the page and I still can’t see it. Huh. More poking around to isolate the reason for that and lo and behold: in the course of all this I discover that directory browsing is enabled on the site - ack! A security no-no. I fixed the image link but now it was back to Google to find out how to disable this… I remembered it was an .htaccess option but didn’t remember the exact syntax and no way I was going to screw up the entire site by editing my root .htaccess with a wild guess. Finally I found what I was looking for and made the change (it’s “Options -Indexes” without the quotes on a line by itself, for anyone who may find this post in the future looking for the same fix) and everything is back to normal. I think. Damned if I am going to look any further and find something else to screw up worse fix!
You know, I think I’ll finish loading the software another day and go mow the lawn, which seems like a much safer venture for the few brain cells that seem to be firing in my head today.