Nik's Technology Blog

Travels through programming, networks, and computers

Peer-to-Peer Software and XP Service Pack 2

After installing Windows XP Service Pack 2 many fans of various peer-to-peer software will find that they no longer function. This is due to changes made to the TCPIP.SYS file in SP 2 effectively limiting the amount of connections a PC can make.

Quite why this change has been made under Windows XP is anyone's guess. A few reasons spring to mind though...

1.) Minimising the effect of SPAM sent out from hijacked computers

2.) Throttling peer-to-peer networks.

I've found a site that purports to have a fix for the problem, but I haven't tried the hack, although I've included the link if you are brave. (I will accept NO responsibility for any concequences of using this hack though.)

All this news will be a blow to the rising number of BitTorrent fans, who use it to legally download Linux distros and other open-source software.

Perhaps this will help Linux gain more ground over Microsoft's Windows?

http://www.lvllord.de/?url=tools#4226patch

Web Developer Extension for Firefox / Mozilla

If like me you work with browsers and web pages on a daily basis then you might find this extension to Mozilla's Firefox a useful tool.

The extension simply adds a web developer toolbar to Firefox enabling you to perform many annoyingly awkward functions of web development much more efficiently.

One of my favourite features enables you to edit a sites' stylesheet on-the-fly. Other features are very useful too, such as the handy view source button, the browser resolution resize button and cookie information retrieval.

It also enables you to validate a page and outline various page elements including depreciated elements etc.

This toolbar is a must for any Web Developer.

http://www.chrispederick.com/work/firefox/webdeveloper/

Web Browsers For Web Developers

A couple of years after the release of Internet Explorer (IE) version 6 and it's starting to feel dated. The competition (Mozilla, Opera, Safari) have superceded any advantage IE had over them with features such as tabbed browsing, pop-up blocking and built in multi-search toolbars. Microsoft's announcement of future revisions being shelved is another nail in the coffin for IE.

XP Service Pack 2 recently introduced a much-needed pop-up blocker for Windows XP users but I don't think this can save IE.

Mozilla's Firefox is gaining ground fast and I'm one of it's avid users. It's fast to load, has tabbed browsing (so you can avoid having 15 IE windows open at once), it's skinable and has a built in RSS reader and the best thing is it's FREE!

What's more it's open source meaning anyone can help in making it better.

What more could you want from your browser?

http://www.mozilla.org/products/firefox/

IE 6 Bug with Absolute Positioned Layers

How important is it that people should be able to cut and paste from your website?

Having designed a site using nothing but DIV tags instead of using a table structure to lay out a page I find that IE 6 has a problem concerning absolute positioned layers.

The pages look fine, however if you go to select a certain piece of text you'll find that it selects the whole page instead (or at least not the part you wanted to select). Frustrating or what!

After some investigation it seems that a lot of people are discovering this problem. One solution it seems is to remove the XHTML doctype from the document, this forces IE 6 into quirks mode, which renders the page differently, the error disappears, but it stops the page from validating. Solution? I don't think so!

The other solution is to avoid using absolutely positioned elements and use relative ones instead. Surely we are trying to progress website design not hinder it.

I have yet to find a proper solution to the problem or find out if and when Microsoft will fix this bug, however I did come across some javascript that appears to correct the problem, albeit a very dodgy looking hack, seems to do the trick though. The link to the hack is below.

IE 6 Absolute Position Text-selecting hack

Wireless and Linux

While I'm on the subject of wireless networks (WLAN) I'm still waiting for Linux to catch up and support more Wi-Fi devices so I can start to use my Linux box to the full. As yet I'm still unable to get Mandrake or Red Hat to work with my MA111 out of the box or using linux-wlan.

If anyone knows of any PCI or USB solutions that are compatible and available in the UK please contact me via my contact page.

http://www.linux-wlan.org/

XP SP2 and Netgear MA111

I installed XP Service Pack 2 last night for the second time after rolling it back previously.

The first time I installed it I couldn't get my Netgear MAlll wireless 802.11b USB device to work, I've since installed it on various other XP machines and with each install i've had different issues with the device.

I learned fairly early on that the supplied Netgear software wouldn't work under SP2, instead you have to opt for Windows XP wireless configuration, which incidentally has been slightly improved since SP1. Having said that it's still not perfect, since you have to enter your WEP in manually rather than use a password to create it like the Netgear software.

There are also issues with driver installation when you do a fresh install of XP and patch it with SP2 before installing the MA111.

The joy of computing :)

http://www.netgear.com/products/details/MA111.php

WLAN (Wireless LAN) Security

Since I bought my Netgear DG824M Wireless ADSL Modem Gateway I've been interested in securing it sufficiently enough to prevent it getting hacked.

Out of the box the router will work with default values, however it is VERY risky to keep your wireless access point running like this.

Here are a few tips which should keep out casual hackers and bandwidth thieves.

SSID (Service Set Identifier) Broadcasting

Your Service Set Identifier is basically the name of your wireless service, wireless access points all come with a default value for this, in the case of Netgear this can either be "Netgear" or "Wireless", you should change this to something else that does not describe your business or location (Note: SSID is case-sensitive).

The default setting on most Access Points is for the SSID to be broadcast out to anyone in range of the router, this is convenient for users to join your network, but handy for hackers to easily identify your network as a potential target. You should disable SSID broadcasting.

WEP (Wired Equivalent Privacy)

This is the wireless security standard, which has been proven to be quite easy to crack, however it does provide some protection, so it is highly recommended you enable WEP preferably 128 bit encryption and change the WEP key from the default value.

MAC address access control

Each wireless (and conventional) network card has a unique MAC address. Most Access Points allow you to configure access to the network via a set of MAC addresses instead of all users, which is usually the default setting. You should use this functionality since it will make it harder for casual hackers to join your network. On Windows machines open a DOS command prompt and type ipconfig/all in order to find the MAC address of your wireless card/USB dongle, simply add the MAC addresses of all the computers you need to access the router.

Wireless coverage

You should try and locate your Access Point in such a way as to reduce the coverage outside your building. Try to position your Access Point in the middle of your building equidistant from your computers and wireless devices, but away from windows and perimeter walls since this will provide good wireless coverage for people outside your building.

Power Requirements for PC Components

I found an interesting article in a PC magazine the other day, which might help people who are building a PC or upgrading their PSU. I've come across this problem too while building my own machine.

What power requirements do my PC components need?

I've tried looking in manufacturers manuals and websites, but most fail to mention this vital piece of information. How do I know what PSU to buy? 200W, 300W or 350W, maybe I should go the whole hog and splash-out on a 400W Power Supply beast!

Use this rough guide to estimate the power consumption of your PC.

PC Component Requirements (Rough Guide)

Celeron - 60W

Pentium 4/Athlon - 70W

Fans (CPU/Case) - 10W

Motherboard - 60W

256MB RAM - 20W

512MB RAM - 35W

AGP video card - 30-80W

CD/DVD drive - 30W

Hard disk - 20W

Floppy disk - 8W

Sound card - 10W

Network card - 5W

Modem - 5W

Firewire card - 40 W

USB 2.0 card - 20 W

Resolving ADSL Synchronisation Set-up Problems

After installing ADSL recently I encountered several problems getting my USB Alcatel Modem to synchronise on the line. I tried everything, or so I thought...

After changing ADSL filters and phone cables from my USB modem to the phone socket I still was unable to get the little green LED on the front of the modem not to blink. According to the manual this synchronisation LED should switch from blinking to a solid green after booting the machine. However there was either a problem with my phone line or a problem between my master phone socket and BT's exchange.

I phoned my ISP and after confirming everything I had done he had run out of ideas for me to try. Before calling BT and fork out £60 on a call-out charge I thought I'd check the phone extension that extends the master socket upstairs. I unplugged the upstairs phone and tried synchronising.

BOOOM!...It worked!

I tried plugging in a different phone upstairs, but still the same problem. So it can't be the phone I thought. It must be the extension cable. Since ASDL runs at high frequencies a bad termination of the phone socket upstairs must be to blame for the problem, perhaps causing the signal to reflect and cause interference on the line.

So for now we can either have an upstairs phone or an ADSL connection. Oh well... one phone isn't so bad!

T-SQL to MySQL Conversions

I've been converting my live web statistics page to PHP and MySQL and after spending a while trying to find MySQL alternatives to Transact SQL (T-SQL) only SQL statements, I thought I'd share a few common solutions to the problems I eventually managed to solve.

Microsoft developers commonly use TOP in a select statement to select the first n rows from a table. The MySQL equivalent is LIMIT, which is superior in that you can specify what row to start on and well as how many to retrieve.

SELECT TOP 20 * FROM MY_TABLE

SELECT * FROM MY_TABLE LIMIT 0,20

Other problems arise from T_SQL's use of Visual Basic (VB). So statements using LCASE, UCASE, INSTR and MID won't work. MySQL of course has alternatives...

SELECT LOWER(name) FROM MY_TABLE

SELECT UPPER(name) FROM MY_TABLE

The SUBSTRING MySQL statement is equivalent to MID or LEFT if you start at the first character. The following statement would result in abcd.

SELECT SUBSTRING('abcdefghijklmnopqrstuvwxyz',1,4)

VB's INSTR is another useful function in T-SQL, the MySQL equivalent is LOCATE. Like INSTR you define a starting point in which you would like to start searching within the string. The following SQL statement would result in 4.

SELECT LOCATE('d','abcdefghijklmnopqrstuvwxyz',1)

MySQL's version of T-SQL's LEN function works in exactly the same manor, only it's called LENGTH. The following statement will result in 26.

SELECT LENGTH('abcdefghijklmnopqrstuvwxyz')

MySQL Manual - String Functions