Archive

Archive for November, 2008

Get Rid Of The ‘WWW’ Prefix – It’s Long Overdue

November 29th, 2008

To understand why the “WWW” prefix or subdomain is outdated, we should first look at the original definition of WWW.

World Wide Web
n. Abbr. WWW 
1) The complete set of documents residing on all Internet servers that use the HTTP protocol, accessible to users via a simple point-and-click system. 
2) n : a collection of internet sites that offer text and graphics and sound and animation resources through the hypertext transfer protocol.

The important part here is the HTTP Protocol. Whenever a link is made, such as http://<domain>, the software will know that a connection to a webserver is made, on port 80. That’s what the http-protocol stands for.

The definition above implies that the “World Wide Web” uses the http protocol to send its data. Why then, do we still need to add the “WWW” subdomain? It’s a waste of time to type it. Wouldn’t it be easier to just type in the domain name, without the “WWW”?

While most webservers will accept traffic on the domain-name, without the WWW prefix, they usually redirect to the WWW-part of the website. Typing http://<domain> will often land you on http://www.<domain>. This should be the other way around.

Using the following .htaccess rule, you can safely redirect all traffic from http://www.<domain> to the http://<domain> version of your website.

Options +FollowSymlinks
RewriteEngine on
# Remove the WWW subdomain, and redirect to the domain itself
RewriteCond %{http_host} ^www\.domain\.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,NC]

For more information on what Redirect-Code to use ([R=301]) I kindly refer you to the following page: Using Proper Header Redirects In PHP. There you’ll find a good explanation on the difference in 301 and 302 redirects, and their effect on search engines.

Matti Webdevelopment , , , ,

Clickjacking – Shere Brilliance!

November 27th, 2008

While the idea of clickjacking isn’t new at all, I’m only just starting to get into the details of it – and by the looks if it, it’s absolutely brilliant. In fact, I’m surprised it hasn’t been done before. Read more…

Matti Security , ,

Why Everyone Should Get A Basic IT Education

November 25th, 2008

As IT professionals, we can talk to one another using our own vocabulary. We understand each other, when we use the words “database”, “uplink”, “TCP”, “webserver”, … We know what it means, and we often even know how to configure it.

That’s not the case for most other people, who come to us for advise & solutions. They often have no clue what those terms mean, and have no incentive to learn it either – they just seek a solution to their problem.

You could think “aah, not a problem – that person doesn’t know what I’m talking about, so I’ll just do what seems best for me.“. Your own solution usually doesn’t fit into the budget that particular person had in mind, so you go on to explain the other solutions – to figure out the best one.

And that’s when it hits you. You’re facing a person with zero IT knowledge, and no motivation or no will to learn anything about it. It’s all Chinese to him, so you’re playing his translator. Read more…

Matti Tech , ,

Permanent Failure – Probe failed: Illegal To: address (invalid domain name)

November 23rd, 2008

You might get the following error when sending out mails to an e-mail address which you _know_ is valid: Permanent Failure – Probe failed: Illegal To: address (invalid domain name). While the error message itself is pretty self-explanatory, it’s something that can easily be overlooked – the domain name of your recipient is miss-spelled.

Take the following e-mail address for example:
To: “Firstname Lastname” <name@domain.com > 

At first sight, that looks pretty valid. However, there’s an added space at the end (right before the ‘>’-sign), that will cause the domain name to be considered invalid. Most e-mail clients would strip excess spaces at the beginning or end, but not all of them. Double check your domain name for the person you’re sending mail to, and keep an eye on the little details.

Matti Tech , , ,

Google’s Chrome Won’t Hurt IE – Only FireFox

November 22nd, 2008

According to a post on ArsTechnica.com, it seems Google is ready to release its new browser to the world, by setting it as a default browser on new computers.

Google, meanwhile, is exploring its distribution options and examining the various ways it might improve its market share. “We will probably do distribution deals,” Pinchai told The Times. “We could work with an OEM (Original Equipment Manufacturer) and have them ship computers with Chrome preinstalled.”

By preinstalling the browser on new computers, you’ll reach a relativily small percentage of internet users out there. It might replace IE for some users, but those who are scared of changes (and that’s just about every PC user with little or no knowledge of IT) will return to Internet Explorer – their safehaven, the software they know and have used for several years. It’s proven to work – why would they switch to something else?

Those people that use FireFox (a 20% marketshare at the moment), have made the step from Internet Explorer to try the new browser. They are the ones that _do_ like change, so they switched. That 20% marketshare is probably the only share that’ll considder using Google’s Chrome. 

By further promoting it, the Chrome browser will only steal marketshare of the “alternative” browsers – FireFox, Safari, Opera, … – not the mainstream Internet Explorer users causing more diversity.

Since the launch of IE3 in 1996 to today, Microsoft has never had to compete for browser share against a company as large and powerful as itself. Once Chrome launches, that’s going to change; Google has the money and the expertise to match Microsoft dollar-for-dollar and feature-for-feature. If both companies stay on track, 2009 may be the year we finally test John Curran’s hypothesis, both in the UK and around the world.

I’m curious to see how that will go. If spending money only means getting the browser preinstalled, then the war will still be won by IE. If it means tearing down IE’s reputation through public ads, commercials and likes – to get to the “common” man, who’s afraid of change – it might tilt the other way around.

If I look at my immediate surroundings, those users that still used Internet Explorer a few months ago, are using it now. Those that had FireFox/Safari/Opera, made the switch to Chrome.

I was ones a FireFox user. I switched to Chrome.

Matti Webdevelopment , , ,

Animated GIF’s In Outlook 2003 & 2007

November 21st, 2008

Don’t bother, it’s just not possible. Outlook 2007 will use the rendering engine of Word. As it is now, Word 2007 (which will be installed when using Outlook 2007) does not support animated gifs. Only the first frame of the animated image will be displayed – so better make this as informative as possible!

Strange how previous versions of Outlook had this functionality, and the “new” version doesn’t. Apparently, the change from rendering engine, from Internet Explorer to Word, was done for “consistency” purposes. They did accomplish that – it’s now consistently harder to get anything to work in Outlook.

Matti Windows , ,

Plesk & MailEnable – missing measp.dll component: Error ‘ASP 0177 : 800401f3′

November 19th, 2008

Plesk on Windows comes pre-installed with MailEnable, and using ASP you can use MailEnable to send out e-mails by creating a “MEMail.Message” object. In a normal Plesk install however, this won’t work, because of a missing measp.dll file. This file is included in the Professional & Enterprise edition of MailEnable, but not in the version that Plesk installs.

You can safely upgrade your MailEnable installation to the version you need, as described on the Knowledge Base of Plesk.

You could also copy the measp.dll file from another installation, and register it using the following command.

Regsvr32 “C:\Program Files\Mail Enable\Bin\MEASP.DLL”

The following registry key should also be added.

Root: HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail Enable\Connectors\SMTP
Name: Bad Mail Notification Sender Address
Type: String (REGSZ)
Typical Value: admin@mydomain.com

More information can be found on the MailEnable Knowledge Base: Error ‘ASP 0177 : 800401f3′ when accessing the MEMail COM component.

Matti Plesk , , , ,

Plesk: Unable to create system user: Empty error message from utility.

November 17th, 2008

The following message can occur when you try to add a Physical Hosting to a domain in Plesk: “Error: Unable to update hosting preferences: system user update is failed: Unable to create system user: Empty error message from utility.“.

Unable to create system user: Empty error message from utility.

Unable to create system user: Empty error message from utility.

Here’s the fix.

In the log file “/usr/local/psa/admin/logs/httpsd_error_log” you’ll see the following entry: /usr/share/cracklib/pw_dict: error reading header.

This can be fixed by doing:

rpm -e cracklib-dicts –nodeps
yum install cracklib-dicts

Matti Plesk , , , ,

Named/Bind: Could not listen on UDP socket : permission denied

November 15th, 2008

When running Plesk on a Windows Server, you might encounter the following error: “Could not listen on UDP socket : permission denied” after a Windows Update. The short version is this: there’s another service listening on port 53 (DNS), which causes the Plesk DNS service to stop working. In this case, it’s the DNS Server built in Windows Server that is automatically started after a Windows Update.

Short solution: stop the DNS service, and then restart the Plesk DNS.

You can test this, by doing the following. Log in via a Remote Desktop connection to your server, and shut down the Plesk DNS service (using the system-tray icon, in the bottom right).

Stop the Plesk DNS Service

Stop the Plesk DNS Service

 Select the DNS service, and stop it using the button on the right. Now run the following command through a command prompt (start > run > cmd) to see if another service is still listening on the DNS (53) port.

netstat -an | find “53″

Netstat DNS Port Listening

Netstat DNS Port Listening

The term “LISTENING” means there’s a service active, that is accepting requests on port 53. Since you shut down the Plesk DNS service, something else is using this port. Go the service management in Windows Server (start > run > services.msc), and find the Microsoft DNS Service.

Microsoft DNS Service Enabled/Started

Microsoft DNS Service Enabled/Started

In the list, the DNS Server will probably be started. Right-click it, and choose “Stop”. If this service is not started, another piece of DNS software is running on your server that’s using up the DNS port. You can check the processlist/task manager to find out which one (popular ones are Bind or Named).

Now run the same command as above, to see if another service is still listening on port 53.

Netstat - No Open DNS Port

Netstat - No Open DNS Port

Port 53 no longer shows a “LISTENING” status, which means any service running on port 53 is now closed.

Re-open the Plesk Service Monitor, as shown in screen #1, and start the Plesk DNS Service again. Now everything should be fine again.

Matti Plesk , , ,

Code Quality & Code Requirements

November 13th, 2008

I’m a programmer by heart. If I don’t do it by day, I’ll do it by night.

This is what I do, and it’s probably what I do best too. I write code. I scribble down thousands of lines, to overcome a certain problem situation. Hardly anyone knows what it means to do so, unless they are fellow programmers. To everyone that doesn’t understand what it means to program, a “good application” will be one that does the job. Simple as that.

To those that understand the mechanics, and the reasoning behind programming, that is entirely different. For them, it’s not just the matter of an application doing what it’s supposed to be doing, but also a matter of “how” it’s done. How “effective” is it? Is it fast? Will it work cross-system? Will it keep working in five years? Was it written with maintainability in mind? Was it written in a  clean manner, or with sloppy code? Read more…

Matti programming , ,