Slipstreaming Service Packs into XP

I needed to create a BartPE Boot disc, but got the error “Source files wrong version. File version of d:\i386\intdll.dll is 5.1.2600.0 should be 5.1.2600.1045 or higher. You must use Windows XP Service Pack 1 or Server 2003 version of windows”

In order to update the files on a Windows installation CD, you need to go through a process called ‘Slipstreaming’. This is the process of including the Service Pack files into the original disk. I tried following the instructions at WinSuperSite, but ran into a problem as my XP disk is an OEM version from Dell, which already includes their updates. When trying to update the original, I received the error “This ServicePack cannot be integrated into a destination that also has integrated SoftwareUpdates.”. I therefore needed to use the nlite utility instead which miraculously removes the hotfixes and painlessly slipstreams the Service Pack into the original. Oh Happy Days :)

nlite will also do all the hard work to create a bootable image for you.

Solving Twitterfeed issues

I use Twitterfeed to spread another blog around the internet via Twitter and Facebook

This normally works very well, but sometimes Twitterfeed seems to miss a series of posts. To understand why, we must look at the raw RSS feed. Each item in Blogger’s RSS feed has the following parameters:

  • <item>
    • <guid> (unique identifier)
    • <pubDate> (timestamp)
    • <atom:updated> (timestamp)
    • <category> (one per tag)
    • <title>(of article)
    • <description> (text of article)
    • <link> (to article)
    • <author>
    • <thr:total> (number of comments)
  • </item>

The problem is that Blogger feeds its posts sorted by Update time (<atom:updated>), while Twitterfeed expects the feed to be sorted by pubDate.

In order for your posts to appear, you need to change some of the Advanced settings. Change the ‘Post Sorting’ parameters so that new items are posted based on GUID and clear the checkbox ‘Feed is sorted’

Problems upgrading WordPress

I decided that it really was time I upgraded my installation of WordPress from version 2.2.1. This is normally a really simple process, but not this time.

Rather than overwriting the existing installation, I always start afresh. I backed up the databases as usual, disabled all plugins, downloaded the latest version (2.9.2) and then proceeded to incoroprate my edits into the new version. I also copied across the theme and plugins.

However, when I tried to run the upgrade script, I got the following error logged in Apache’s error_log

[notice] child pid 19836 exit signal Segmentation fault (11)

After speaking to my Hosting company, they advised that they had had a lot of compatibility problems with PHP 5.3.0 and advised downgrading to PHP 5.2.12 instead.

All is OK now

Custom Error Page returns status 200

I was recently playing with Google’s webmaster tools and ran into a problem with my custom error page. Although I have had it set up for some time, it was apparently incorrectly configured. Google complained ‘We’ve detected that your 404 file (file
not found) error page returns a status of 200 (Success) in the header. ” which means that the page was found and they’re not happy.

In order to troubleshoot this, I connected to my web server using telnet. This enabled me to see the exact data that Apache is delivering in reply to the request. This is what you need to do

  1. Open a Command prompt window (run cmd.exe on a PC)
  2. Connect to the web server (Apache) using telnet. If your web server does not run on port 80, then use the correct value. telnet mydomain.com 80
  3. Ask for the header of a non existent page by typing HEAD invalidpage.html HTTP/1.0. Although the cursor moves, NO TEXT WILL APPEAR ON THE SCREEN.
  4. Press the Enter key twice and wait for a reply

The reply you get should look something like this

HTTP/1.1 404 Not Found
Date: Fri, 30 Mar 2007 11:30:22 GMT
Server: Apache/2.0.52 (Red Hat)
Last-Modified: Fri, 30 Mar 2007 09:56:45 GMT
ETag: "13148ae-4fd-e39fb140;741a7f80"
Accept-Ranges: bytes
Content-Length: 1277
Connection: close
Content-Type: text/html

Connection to host lost.


When I tested my site, I found that it was responding

HTTP/1.1 302 Found
Date: Fri, 30 Mar 2007 11:33:22 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b PHP/4.4.2
Location: http://xxx.xxx.xxx.xxx/404.html
Connection: close
Content-Type: text/html; charset=iso-8859-1

Connection to host lost.

So my server was returning a status code of 302 which is a temporary redirect. When Google followed this to the new location, it received the 200 status code as the ultimate file exists. I tried adding the line

<meta http-equiv="Status" content="404 Condition Intercepted" />

in the head section of my error file as suggested on another site, but it made no difference. The real problem was that I had failed to notice the comments in the Apache manual

Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as http in front of it), Apache will send a redirect to the client to tell it where to find the document, even if the document ends up being on the same server. This has several implications, the most important being that the client will not receive the original error status code, but instead will receive a redirect status code. This in turn can confuse web robots and other clients which try to determine if a URL is valid using the status code.

I wanted to use the same error page for multiple domains hosted on my VPS and so had hardcoded the IP Address into the URL. The line in my Apache configuration file read ErrorDocument 404 http://xxx.xxx.xxx.xxx/404.html. I therefore changed it to ErrorDocument 404 /errorp/404.html and created an alias for /errorp/ Alias /errorp/ “/path/to/custom_errors/”. My custom error page now responds correctly :)


HTTP/1.1 404 Not Found
Date: Fri, 30 Mar 2007 12:43:22 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_gzip/1.3.26.1a mod_ssl/2.8.12
OpenSSL/0.9.6b PHP/4.4.2
Last-Modified: Fri, 30 Mar 2007 12:12:48 GMT
ETag: "2c6439c-261c-460d8b60;46a7f31a"
Accept-Ranges: bytes
Content-Length: 9756
Connection: close
Content-Type: text/html


If you have to use http: in your Custom Error Page's definition, then you are better off using a redirect in a local file. This will preserve the error status code. Your local error file should look something like this

<HTML><HEAD>
<META http-equiv="refresh" content="0; URL=http://www.example.com">
</HEAD>
<div style="visibility:hidden">
;Lets insert some random text here in order to keep Microsoft Internet
;Explorer happy. In their wisdom, Microsoft have decided that any custom
;error page with less than five hundred and twelve characters of text
;in it will be totally ignored and they will display their Friendly HTTP Error
;message instead. This is detailed in knowledge base article Q294807
;at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807
;Well, I think that that is enough from me for now or maybe I should
;just type a little bit more to make sure that I have typed enough...
</div></BODY></HTML>

Optimising your broadband connection

I had some problems achieving the expected throughput from my broadband supplier. I have a nominal 24 Mbps ADSL2+ connection and should be achieving downloads of 14 Mbps. These are the steps to follow to improve your downloads.

First, establish whether the problem is upstream or downstream of your router.

  • Find out how far you are from your telephone exchange. The only way to get a true value is by running the line test facility, but BT have restricted this to authorised personnel. So, in the meantime raise a ticket with your provider and get them to find out. Alternately, you can get a rough idea by plugging your phone number and postcode into the Broadband Checker over at DSLZoneUK and you’ll get a pretty map. . I cannot find this on SamKnows anymore…
    Example: 460m
  • Calculate the route using Multimap to drive it for you. This will give you a rough guide of your possible cable length; they don’t always follow the most logical routing and if you’re in a rural environment, the cables will cut across fields.

    Example: 700m
  • Download and run DMT from http://dmt.mhilfe.de/. This page is in German, but just search for your modem and download the right version; this is v7.31 for the Speedtouch 780. You might be able to use this link for a Google translation of their site.
  • Look in the bottom right of the third graph (Channel Characteristics). This will give you the estimated loop length. This should be similar to your twice the cable length.

    Example: 830m-2015m
  • Go to router’s web interface and check what your current Sync speed and Line Attenuation are.

    Example: Bandwidth (Up/Down) [kbps/kbps]:394 / 18,106 —> 18106 kbps –> 17.7 Mbps (18106/1024)
    Line Attenuation (Up/Down) [dB]: 7.5 / 19.5 —> 19.5
  • Look up your expected Sync speed using either this interactive tool or the graphs provided by afster or Internode graph. Take 10% off the figure provided by the interactive tool to get a realistic sync speed.

    Example: Approx 18.2 Mbits/sec according to average graph
  • IF your sync speed is significantly lower than the expected value OR your Line Length is higher than predicted, THEN start looking at wiring issues. If not, then check OS parameters.

This graph shows the real life results from hundreds of users, relating their sync speed to the downstream attenuation reported by their router. Those above the green line are lucky :)

Next optimise your PC’s performance. You will need to be logged on as a user with Adminstrative privileges. If you only have one account, then you will have the required privileges.

  • Download and run TCP Optimiser from SpeedGuide.net. Click on Optimal settings, Apply changes and exit.
  • Reboot your computer.
  • Verify that your Network card is configured for maximum throughput (100 Mbps Full Duplex). To do this, click on
    • Start
    • Control Panel
    • Network and Internet Connections
    • Network Connections
    • Select your network card and click on Change Settings of this Connection or right click on the card and select Properties…
    • Click on the Configure… button next to the Network card name
    • Click on the Advanced tab.
    • Set the appropriate property to 100 Mbps Full-Duplex. On my network card, this is called Media Type
      There are other tweaks that you can do here, such as disable Rx and Tx Checksum Offload. I am not sure of the advisability of doing this.
    • Click on OK
  • Run Microsoft’s Guided Help to maximise your PC’s performance. WARNING! This will disable all themes and turn your PC into retro mode ;) Further details can be found in this knowledgebase article
  • Minimise the window during downloads where possible. It is possible that your graphics processor cannot keep up with the download :)
  • Check CPU usage during downloads and investigate any processes which are consuming too much. Anti Virus packages such as Kaspersky have been known to cause problems during downloads, so try disabling them TEMPORARILY while running any download tests.
    • Right click on a blank area of the taskbar at the bottom of your screen
    • Click on Task Manager
    • Click on the Processes tab and then double click on the column labelled CPU. If the CPU column is not displayed, then click on View and Select columns… then enable the CPU Usage option.
    • The process using the most processor time should be at the bottom of the list
  • Check your memory usage during downloads and investigate any processes which are consuming too much. If the Memory Usage column is not displayed in the task manager, then click on View then Select columns… and enable the Memory Usage option.

All speed checks should be run using a properly shielded Ethernet connection, even if your Wireless connection claims an ‘Excellent’ signal strength. If everything is OK, then we should be able to get download speeds at upto 80% of our sync speed.

NOTE: Speed Tests are to be used as a guideline only. As one commentator said

Speedtest.net shows me at 9000kbps, the Be* test puts me at 9500kbps, Thinkbroadband puts me at 16000kbps and the Virgin Media FTP puts me at about 8000kbps.

All of which are dramatically wrong, since I am synced at over 24000kbps and can download at 2MB/sec from some FTP’s on a single thread, let alone multi threading.