Archive for Sysadmin

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

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

What is a hacker?

Not so long ago I was asked to answer some questions for a friend of a friend who was writing a dissertation about the “hacking and warez scene” (which I have not been heavily involved in since I turned 18).

As I had known him for a long time, I felt obliged to help out, plus I was now interested in the questions that would be asked.

Based on what had been said I knew they were going to be questions on defining what a hacker is and what a hacker does, something i’ve been interested in defining for quite some time.

Here’s what I said…

Read the rest of this entry »

Comments

Friendly URLs (revisited)

Turn dynamic URLs into friendly URLs

I’m sure we’re all familiar with URLs that look like this:

http://www.example.com/?nav=page

These type of URLs aren’t particularly “friendly”, inf act they are so ugly that even Google doesn’t like them!

Read the rest of this entry »

Comments (1)

Firefox “Always On Top” on Windows XP

When watching long streaming online videos I often watch them while I do other things, perhaps even browse other websites. I need something to keep firefox on top!

The problem is the moment that I use another application the focus is taken away from the Firefox window and it goes into the background. This is no good as I can no longer see the video.

I decided to investigate a solution that could keep the Mozilla Firefox window “Always on Top”…

Read the rest of this entry »

Comments

Arrange icons by modified in a music folder

Windows XP often does some really annoying things, such as automatically customising a folder, changing it’s kind into “music”, when it detects that the folder contains music files.

Although for some people this might be useful, for me it’s not. Often I’ll want to sort the files in a folder by different fields, NOT the ones that music folders have.

Easy, I thought, it’s just a case of changing the folder customisation kind back to “Document”. Wrong.

Read the rest of this entry »

Comments (4)

Samsung ML-4500 XP driver install

I decided I was finally fed up with my Epson Stylus C46 bubble jet printer, and decided that I don’t really need it anyway.

Everything I print only needs to be in black and white, and anything else I can print onto the HP Photosmart 3110 All-in-one that I have located in the room on another machine.

So now it’s time to get serious, I decided to use a Samsung ML-4500 laser jet I had lying around spare.

Only, how do you install this thing on Windows XP?

Read the rest of this entry »

Comments (1)

How to bulk convert WMA to MP3

So you just downloaded an entire album, and it’s in .wma (windows media audio) format, and you, of course, like any normal person want it in the .mp3 format.

What do you do?

Read the rest of this entry »

Comments (1)

Text editors revisited

As a web developer my main tool is my text editor, which I use for pretty much EVERYTHING from coding HTML, to PHP to perl. A text editor is an essential part of my day-to-day life.

Meaning I need a text editor that I does what I want, the way I want it.

Read the rest of this entry »

Comments (4)

Missing accessories shortcuts from start menu on Windows XP

I’m currently using a computer that has the “Remote Desktop Connection” icon missing, in fact the whole of the “Communications” directory is missing! Oh no… Never fear…

Read the rest of this entry »

Comments

« Previous entries