Category Archives: Windows

CR vs LF vs CRLF

If the above title seems cryptic, it’s supposed to be. It’s representative of a problem that I came across today when I was editing one of the plugins on this site. When I went to check the plugin status, I was shocked to see that instead of the normal options to activate/ deactivate the plugin, all I got was a mish-mash of PHP code.

I couldn’t think why this had happened, then it hit me. I had done the editing on my MacBook. The Mac, just like every other platform has built-in text editors. These editors treat text in much the same way as editors on other platforms, although there is one crucial difference. When you hit the enter key on a Mac, a special character is inserted to signal that a new line should be started. On a Mac, this is called the Carriage Return, or CR, character. On a Windows editor, the enter key inserts a Carriage Return – Line Feed, (CR-LF), character, and on a Linux machine, it’s a Line Feed, (LF), character.

So each of the major platforms treat a new line in a different manner. The upshot is that if you write a text document on a Windows machine, the new line will be interpreted correctly on both a Linux and Mac, as it uses characters common to both. However, if you write a text document on a Mac, then it won’t be interpreted correctly on a Linux machine, and vice versa.

So here was my problem, I had edited the PHP files on my Mac and uploaded the changed files to a Linux server. Using EditPad Lite for Windows, I was able to easily convert the newline characters from CR to CR-LF, and re-upload the file. Problem solved. The only thing that I can’t figure out is that if Linux has a problem with the CR-only newline character, how come the plugin worked OK?

Reinstalling Windows on a Dell Dimension 2400 Part II

I eventually got around to installing XP on my friends Dimension 2400. As he did not have any restore CD’s, I had to use a copy of XP that I had myself. The install itself went fine, and after about an hour or so I had a working install. The only problem was that XP wanted to be activated. As the product key was an OEM one, it’s not going to activate. So now I’m stuck. I can either use a crack to bypass the activation, or I can try to get a copy of the restore cd’s.

As this is a perfectly legal install, I’d prefer not to resort to have to use a crack. On the other hand, there doesn’t seem to be any way to order restore CD’s from the Dell website.

I have created an image of the hard-drive, so I can restore that back if I need to, but that isn’t going to do a whole lot except get me back to square one.

I’ll have to think about this one a bit, and see if there is anyway that I can get the original Dell OS back onto the system.

Reinstalling Windows on a Dell Dimension 2400

A friend asked me to have a look at his PC last week because he was having a problem starting the computer. More specifically he was getting a blue screen with “STOP 0X000006B PROCESS1_INITIALIZATION_FAILED”. As far as I can make out, this type of error occurs because there is a required system file missing. No information on which file is missing or damaged. But what else can you expect from a blue screen of death?

Apparently he was doing a Windows Update and the system stopped responding so he turned it off. Now this type of error doesn’t bug me so much. After working with Windows for so long, it’s pretty much expected that whenever anything goes wrong it will result with an unrecoverable blue screen error that will prevent you from being able to even attempt to fix the problem.

No the blue screen doesn’t bother me. What does bother me is Dell’s restore process. Especially the part where the manual says to tap CTRL+F11 when booting to start the restore process. Expect for this particular model it doesn’t work. It doesn’t work because it was never installed. This wouldn’t be too bad, but these days Dell don’t ship restore CD’s with their PC’s. They have to be ordered. Now there might be a restore program accessible from Windows, but a fat lot of good that will do when Windows won’t even start in Safe Mode.

So it looks like I’ll have to install Windows into a different location on the hard drive and then see if I can locate the restore program. If not, I’ll have to do a vanilla install of Windows and install the various applications separately. And that’s going to be a real pain.

Protecting Your PC

As anyone who uses Windows on a regular basis will tell you, security is a problem. It’s a problem because Windows is the biggest target out there, and every script-kiddie, virus-writer with half a brain can write software to exploit it.

It takes time and effort to lock down a computer. More than time and effort than most end users are willing to dedicate to the issue. Securing your computer is more than preventing unauthorised access, it’s about protecting your private data, and ensuring that your computer continues to work the way you want it to. So here’s my basic guide to securing your home PC.

Continue reading

Creating Your Own Disk Images – Why And How

My old system has been sitting unused on my desk for the last couple of months. Part of the reason that I wasn’t using it was that I had installed Windows Server 2003 on it with the intention of using it as a web and backup server for my home LAN. The problem was that I had never used Windows 2003 before, so I was spending more time reading about configuration options, rather than actually configuring it.

Previously I had tried installing Linux on it but found that trying to get Samba, Apache, PHP and all the other pieces I needed to work was also too much hassle. Eventually I gave it up as not so much a bad idea, but just an idea that I didn’t have time to fully research and implement. I’d love to have the time to delve further into the Linux idea, but for the time being it’s not to be.

Continue reading