Archive

Archive for August, 2008

Microsoft .NET Framework 3.0 Update (kb928416) On x64 Server

August 30th, 2008

In case you’re google-ing after this, it’s normal that the Windows Update for Windows Server 2003 x64 kb928416 takes a _very_ long time to install.

This update installs the 3.0 version of the .NET framework. During the install, you’ll see hardly no CPU usage, nor any I/O requests. But don’t worry, it’s working in the background. Took nearly 20 minutes for that single update to install on a x64 w2003 server here – and it got me just a little worried … but it installed fine, and is working properly at the moment.

Matti Tech

How To View E-Mail Headers In Outlook 2007

August 29th, 2008

While it’s a bit hidden, you can still view the Message Headers for any mail you receive in Outlook 2007. And there are 2 ways to view them, too. Read more…

Matti Windows , , ,

Take Over Your Mobile Phone From Your Desktop PC

August 28th, 2008

Here’s an interesting piece of software: My Mobiler. It uses your ActiveSync connection to make a Remote Desktop Connect (RDP) to your mobile phone (if it uses Windows Mobile). After installating the software, you’ll get an installation-request on your mobile phone to install the RDP software.

After that, it’s like a walk in the park.

Open the software, and you see the exact same screen as you’d see on your Mobile device.

This is especially useful when you need to take screenshots of your mobile device (say, for a helpdesk-article) or if you want an easier way of controlling your mobile device through your desktop. Very useful, and worked right out of the box for me.

Works just like your Remote Desktop does for other computers, but for mobile devices!

Matti Mobile , ,

There Are HTTP Headers, And Then There Are HTTP Headers

August 28th, 2008

Sounds confusing? No worries, it’s really not. Here are some standard HTTP headers from a random website.

[root@vps ~]# curl --head http://www.mattiasgeniar.be
HTTP/1.1 200 OK
Date: Thu, 28 Aug 2008 17:58:15 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
X-Pingback: http://www.mattiasgeniar.be/xmlrpc.php
Set-Cookie: PHPSESSID=sudpae35dbuesipfiouipcbue0; path=/
Connection: close
Content-Type: text/html; charset=UTF-8

Nothing special about it, perhaps the X-Pingback is a bit odd – it’s added by wordpress to allowed automatic pingbacks to certain articles. You have your typical date, server, connection & content-type shown to you.

Some sites however … like to add some special things. Slashdot for instance adds a new Futurama quote with every page you load. It’s hidden to 99,9% of the users out there – only the geeks who actually look at the headers will see this.

[root@vps ~]# curl --head http://slashdot.org          
HTTP/1.1 200 OK
Date: Thu, 28 Aug 2008 18:02:27 GMT
Server: Apache/1.3.41 (Unix) mod_perl/1.31-rc4
SLASH_LOG_DATA: shtml
X-Powered-By: Slash 2.005001217
X-Bender: They're tormenting me with uptempo singing and dancing!
Cache-Control: private
Pragma: private
Connection: close
Content-Type: text/html; charset=iso-8859-1

Note the X-Bender: They’re tormenting me with uptempo singing and dancing! quote in there! You’ll also find quotes by Leela & Fry.

  • X-Bender: I only know enough binary to ask where the bathroom is.
  • X-Bender: Gimme your biggest, strongest, cheapest drink.
  • X-Leela: This is by a wide margin the least likely thing that has ever happened.
  • X-Leela: This toads the wet sprocket.
  • X-Fry: You mean Bender is the evil Bender? I’m shocked! Shocked! Well not that shocked.
  • X-Fry: I must be a robot. Why else would human women refuse to date me?

It’s probably been known for a while, but it was knew to me. Kinda cool – now I’m looking at ways to add fancy headers for this server as well … :-) You can read more about it on this Fun With HTTP Headers article!

Edit: turns out it is incredibly easy to add a custom http header to apache. Just enable the use of .htaccess and you can add all the headers you like. Add the following line, to create a “X-Who-Rocks”-header!

Header set X-Who-Rocks "Mattias Geniar"

This is what the headers for this site now look like! Muchos better! :-)

[root@vps httpdocs]# curl --head http://www.mattiasgeniar.be
HTTP/1.1 200 OK
Date: Thu, 28 Aug 2008 18:23:48 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
X-Pingback: http://www.mattiasgeniar.be/xmlrpc.php
Set-Cookie: PHPSESSID=ibmsf43qjjnkc6h6fudfok0sp5; path=/
X-Who-Rocks: Mattias Geniar
Connection: close
Content-Type: text/html; charset=UTF-8

Yarrr!

Matti Humor, Security , ,

Multiple Headers With Same Name Causing Errors In IIS

August 28th, 2008

What if you created a website in IIS, and all of a sudden it shows you the following message in the “status”-column: Cannot create a file when that file already exists. Search all you want, it’s a confusing error – and there’s no problem with a duplicate file whatsoever. Read more…

Matti Tech

You’re Not A Hygiene Manager …

August 28th, 2008

… you’re a cleaning lady. That’s what you do – you clean things. Why try to name it “Hygiene Manager” in the first place? To attract more potential hygiene managers? So you can go to your monthly hygiene manager meetings to discuss the latest trends in marketing & financing of your cleaning tasks? No. The title’s overrated, get over it.

It’s a common thing in IT as well, coming up with the most fancy names for some of the most basic jobs.

Microsoft Evangelist: you work at Microsoft (that’s enough to draw the attention anyway), and you claim to be an evangelist? Someone sent by God Almighty to solve any world-threatening issue? Wow, you have guts to take on that responsability!

Support Engineer: well, sounds better than “That Helpdesk Guy”, doesn’t it?

Software Engineer: you’re a programmer, no matter how good you are, or how much experience you have – at the end of the day, you’re still a programmer. (but if it’s any consolation, so am I ;-) ).

Senior Storage Administrator: you’ve collected enough porn in your life to have quite a collection, spread over multiple hard drives. Seriously, you just claim this title for your own – and you deserve it!

And any job title that has Executive or Chief in it, is the same as the job title without that word – but with longer hours, more stress, less satisfaction and more shit coming your way. That, and the obvious financial benefit. Or am I seeing things too black ‘n white here?

Matti Tech , ,

Why Is Mail Being Blocked By A Spamfilter?

August 27th, 2008

Aah, a challenging one. I got asked this same question just today. So you’re sending out e-mails, but the receiver tells you they arrived marked as spam? Then consider yourself lucky, another spam filter just might have totally blocked your e-mail there.

Spam filters will analyze your e-mail content & headers for certain patterns, and assign a score to each pattern (also called Block Rule). If the sum of all those scores exceeds a pre-defined value, the mail will be tagged as spam and either blocked from arriving, or arrive with a specific subject (prefixed ***SPAM***, as Plesk does).

Here are just some of the reasons mail might be getting blocked at your recipient. Read more…

Matti Tech , , ,

It’s Linux Tutorial Time!

August 26th, 2008

What does one do all day long, when you have no other obligations? You could clean the house, cook a meal, mow the lawn, trim the hedges, clear the weed, do your grocery shopping and go to the mail. But you usually have a girlfriend/wife to do that for you, so you can browse the internet all day ;-) .

Here’s a list of some interesting articles I came across, relating to Linux.

  • Mastering The Linux Command Line History
    Very nice read on different possibilities using the history command in Linux. Time-stamping your results, search through them, manage the history-log, …
  • Basic Linux Commands
    At the Google Code University they’ve published a nice read-up on the most basic Linux commands.
  • Greppin’ In The GNU World
    Another one from the Google Code University, this time an interesting page dedicated to using grep and patterns to find what you need in the linux shell.
  • 7 “must read” Linux tutorials
    A nice collection of interesting tutorials, ranging from bash scripting to routing & traffic control in Linux.
  • Linux Kernel Swear Count
    This one is just for fun; seeing as the source code for the Linux Kernel is available to the public, interesting statistics can be gathered. Such as: how often are words such as “fuck”, “shit”, “crap”, “bastard” and “penguin” used?

Matti linux ,

“urchinTracker is not defined” Google Analytics Error

August 25th, 2008

It seems the new and improved tracking code from Google Analytics isn’t the only one having some issues with AdBlockers; the normal “Legacy Tracking Code” shares a similar problem.

It occurs when your AdBlocker prevents an external javascript file from being loaded (urchin.js) from google-analytics.com, or when the site just not available. This will present your users with a nasty javascript error you don’t want.

Here’s the solution, modify your javascript so it includes a check to see if the function exists, before calling it.

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
 
<script type="text/javascript">
_uacct = "UA-CODE";
if (typeof(urchinTracker) == 'function') {
  urchinTracker();
}
</script>

There’s also a fixed urchin.js file you can use, instead of linking to Google-Analytics.com to download the file. More information can be found on The Giant Robot blog.

You could also change the URL for the file, in case the HTTP-site is down, to include the file from a HTTPs website: https://ssl.google-analytics.com/urchin.js. In fact, you should consider including the HTTPs version all the time when you run a website over HTTPs. This will present some false-positive warning messages, where the user will be alarmed that content from an unsafe website is being loaded (google-analytics.com, over HTTP). Change it to the HTTPs file-location, and that solves it too.

Matti Webdevelopment , ,

“_gat is not defined” Google Analytics Error

August 25th, 2008

A common problem with Google Analytics is the “_gat is not defined” javascript error, when you try to load a webpage that uses Google Analytics to track visitors behavior.

This happens because the visitor most likely has an AdBlocker installed (such as AdBlock Plus for Firefox), which filters out a javascript file from Google. The code then tries to create an instance of an object it doesn’t know (because the definitions are missing, since the file isn’t included) and it throws the “_gat is not defined” error.

We wouldn’t be showing the problem, if there weren’t a solution of course. Just change your code to the following, which will check if the object actually exists before trying to create an instance of that object. The tracker won’t fully work (but it didn’t in the first place anyway), but at least the user won’t be shown the nasty javascript error.

<script type="text/javascript">
if (typeof(_gat) == 'object') {
	var pageTracker = _gat._getTracker("UA-CODE");
	pageTracker._trackPageview();
}
</script>

This only happens if you try to use the New Tracking Code (ga.js) (the new, and “improved” version) over the old Legacy Tracking Code (urchin.js). The bug’s been around for a while, it’s strange Google hasn’t provided a clear fix for this yet …

Update: new Analytics code doesn’t have this problem anymore. If you edit your Site-details in Google Analytics, and view your Google Analytics code, you’ll see something similar to this:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-MYCODE");
pageTracker._trackPageview();
} catch(err) {}</script>

Error handling has prevented the error message to be shown. It is advised to use the code that Google provides, instead of the “hack” shown on top of this page.

Matti Webdevelopment , ,