Archive for Sysadmin

How to restart the explorer shell in Windows XP

If you have landed yourself here chances are you already know why you want to do this, but for those who don’t here’s why:

When installing a new application, they sometimes require you to restart for them to work, often just restarting the Windows explorer shell will be sufficient for it to work as expected.

Normally most people just kill it via Task Manager, but this can have adverse effects on your system (such as data loss), so here’s how to do it properly:

Read the rest of this entry »

Comments (2)

PHP getmxrr() support for windows

As many of you may be aware there’s a lack of getmxrr() support in Windows, which dates back as far as 1999.

It’s not a major problem for me as an individual because I never use WIN32 PHP in production, but for development and for the purpose of wide distribution it can raise an issue.

Apparently the lack of support in win32 is due to the lack of “res_search” in “bindlib_w32″, I’m surprised this hasn’t been fixed already.

The official PHP.net documentation for the getmxrr() function states:

Note: This function is not implemented on Windows platforms. Try the » PEAR class » Net_DNS.

However, there are problems with this suggestion…

Read the rest of this entry »

Comments (2)

Missing Mediaid.bin file

Recently I got asked to backup a Vista machine. I’m not a big Vista fan, so this was the first time.

I went ahead and backed up the entire machine onto my external USB hard drive, no problems.

However when it came to restore to a new vista machine I found myself with the following error:

The restore did not finish successfully. Error code:
The backup file could not be found. Check your hardware configuration or restore from a different backup (0×8100001A).

Read the rest of this entry »

Comments (1)

Don’t forget to run make test!

During my install of PHP5 on FreeBSD…

Build complete.
Don’t forget to run ‘make test’.

amber# make test
make: don’t know how to make test. Stop

It made me laugh anyway.

Comments

Setting up a FreeBSD socks proxy server for use with mIRC

I’m getting fed up with my current IRC BNC software. At the moment I’m using psyBNC, which means I have to connect to it like you would an IRC server, then issue commands to that to tell it to connect to the IRC server of your choice.

I no longer need the features of psyBNC and decided that there must be a better way.

At first I started looking at other, more basic BNC software, but then worked out that they work in very much the same way as psyBNC in the fact that you have to first connect to it, then tell it where to connect to.

So I thought… What about a socks5 proxy?

Read the rest of this entry »

Comments (3)

Tracking an IP address

In my job I have to manage lots of machines all over the place. Many of them are on windows.

I often find tracking IP addresses to be a difficult task if they do not have a static IP address.

So what can be done to keep track of an IP address?

Read the rest of this entry »

Comments (3)

How to extract photos from an exe

I wasn’t going to write about this, but I liked the solution (application) so much I had to shout about it.

I was provided with a 30 day cd preview slideshow of wedding photos, and was asked very kindly to attempt to extract the photos from it so they could be viewed beyond the trial period.

Read the rest of this entry »

Comments

Print dialog does not appear in Outlook Express or Internet Explorer

Today I get a call.

Outlook Express won’t print.

I log in and take a look. Everything seems normal, and normal documents appear to print.

However, when I click the print button or go to File > Print nothing happens. Strange.

They are running Windows XP Professional SP2, with IE6.

Read the rest of this entry »

Comments (1)

suPHP and .phps PHP code highlighting support

Today a user on one of my web servers asked me why .phps files would only download and not show the highlighted PHP code as expected.

This is usually done by adding the following to your “httpd.conf”…

AddType ‘application/x-httpd-php-source’ .phps

We use the cPanel web hosting control panel and to improve security cPanel recommend using suPHP, which allows PHP scripts to run as a user rather than “nobody”.

This means that adding the above line to “httpd.conf” does not work with suPHP.

So what can be done?

Read the rest of this entry »

Comments (2)

longip script

I wanted to create a script that would convert a normal IP address to a long IP, just like mIRC Script’s $longip alias.

$longip(address)

Converts an IP address into a long value and vice-versa.

$longip(158.152.50.239)  returns 2660774639

$longip(2660774639)       returns 158.152.50.239

What I was originally trying to do was increase an IP by 1, but due to the octets only allowing up to 255, this became increasingly difficult to do.

What I decided to do in the end was convert the IP to a “longip” then increase it by 1, then convert the IP BACK to normal IP.

This required a way to convert an IP to and from longIP, I was told it could be done purely using shell script, here’s what I did…

Read the rest of this entry »

Comments

« Previous entries Next Page » Next Page »