A Tale of Trying to Fix What’s Broken

6 10 2011

My hard drive actually did go south.   Neither System Mechanic nor SpinRite were able to deal with a read-write head that had apparently gone bad — how is still a mystery. The result is that  data ended up getting destroyed which only became evident after the fact, when I tried to restore that data to my brand-new hard-drive.  I was hoping to perhaps use the broken hard-drive  but it had been “crunched” way too much.  If you ever hear your computer making a sustained crunching sound, that should be a red flag that something may be terribly wrong.  It’s not the little noise you may hear when you run your Anti-Virus software.  I’m talking about sustained crunching and afterwards, maybe even the following day, getting a message about the computer being unable to find the hard-drive!

Now the big push has been to restore  former content, in particular the local copy of my website. After installing WampServer2, I then ftp’d my site to my desktop and that should have sufficed — except that the ftp’d files lacked my .HTACCESS files.

I became aware that something was amiss with my local website when I saw a broken image and yet on the remote site the same page displayed perfectly. Both sites had the same images, too. What was the problem? You might think that it was just a path issue which is normally an easy thing to fix — except that the files on the remote server were dynamically generated and cached. So, even if I had edited the one file with a broken image, the problem would still have remained, namely the missing .HTACESS file that allows for something called “funky caching”, a term I believe Rasmus Lerdorf coined. If I wanted to have that sort of behavior on my local webserver, I needed that file since it specifies which php script among the many I’ve written that needs to apply the caching on a restricted basis. The PHP script gets automatically invoked when a “404 File Not Found Error” is generated.

When I restored the Windows XP operating system, Windows only displayed file names but hid the extensions as if that were unnecessary clutter. Furthermore, I was unable to see the .HTACCESS files on the remote host using my Windows professional FTP client. Hmm, maybe I should have upgraded my FTP client? I tried doing an FTP through my browser and that too failed to reveal what I was seeking. I read online that a host can set up an FTP server to hide such files in a listing. So, whether it was my FTP client or my security-conscious webhost, the result was still the same — I was unable to access the file I needed. Of course, I could have recreated it since it only contains one line, namely:

ErrorDocument 404 (followed by full path of filename of PHP caching script).

But suddenly the problem had changed and my interest devolved around how to get that file or any other hidden file from my remote host.  So, I  reread my blog item FTP and .htaccess which has instructions about how to unhide extensions in Windows XP as well as how to FTP from the shell command line in Windows. This time for some reason I had to use the command mget to download a file to my hard-drive. After that I used the primitive editor “Edit” to view the contents; I could have just as easily used the CLI editor called edlin.

After deleting all the cached articles with the broken image,  I had them recreated by clinking a page with links to each article that needed to be generated again. In less than ten minutes, I had restored all the articles and with all the images displaying nicely, too. “Funky Caching” may be now considered an old-fashioned and less than robust form of a CMS, but I like it for the part of my site where it’s employed.

I suppose this tale has a moral. Is it back up your data? Yes, absolutely. But beyond that, whenever you think that something is old and useless and that the professional version with the attractive GUI is better, think again. That FTP client that comes with Windows is a keeper! Also, if you decide to do any “funky caching” document that somewhere, including information pertaining to the .HTACCESS file and the PHP error handler script which creates the stash of cached files.

These days a hard-drive can even go out of commission after a mere year of use. Also, if you want your hard-drive to have better longevity, it’s important to avoid working in a hot room. Some people think 90 degrees Farenheit is when you should turn the computer off.  I, myself, am going to be more conservative and click off at 85 degrees. And, yes, an overheated hard-drive could lead eventually to a malfunctioning or unusable hard-drive.

Let’s end on a happier note. Hard-drives are much cheaper than ever and you can get a whole lot more for less money these days. Here are some useful links that I’ve found with respect to FTP, .HTACCESS files and unhiding Windows file extensions:

FileInfo.com Help Center

FTP

Raw FTP

Wise Women – Using the .htaccess file

Htaccess FAQ

This work is licensed under a Creative Commons License

Advertisements

Actions

Information

2 responses

18 02 2013
Arletha

Exactly how long did it acquire you to create “A Tale of Trying to Fix Whats Broken Sharon Lee
Levy’s Blog”? It provides a large amount of high-quality material. Thanks a lot -Marti

20 02 2013
Sharon Lee Levy

Usually I write pretty fast once I’ve collected my thoughts. In this case, it took a little longer since I kept trying different things to get my computer back in action. I’m glad you like the blog post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: