Changing the php.ini without access

August 16th, 2008

Recently, I needed to turn on magic quotes for a customer on our web hosting. Now, our web hosting is not actually hosted by me, rather I purchase a reseller package. This allows me to offer cPanel access without having to spend an absolute fortune on it. However, it means I don’t have access to the php.ini and hence can’t turn on magic quotes.

Now, I wouldn’t want it on anyway (and it’s quite bad apparently) so how could I enable it just for this customer?

The answer? .htaccess . I have always thought .htaccess as just a file that controls access, not an entire config. Adding the following line

php_flag magic_quotes_gpc on

Turns Magic Quotes on for that user. Awesome.

There is a lot more that can also be configured via the .htaccess too, such as extension handling and more. Have a look into it if you’re intested.

Guitar Hero 3

July 24th, 2008

It rocks.

I’ll write more when i’ve got some spare time in which i’m not playing it…

PropHunt Server Back

July 3rd, 2008

After months of neglect, i’ve updated and started the Garry’s Mod Prop Hunt server again. It’s still at 4 players as before, but if it’s popular i’ll raise that limit.

In Prop Hunt, there are two teams, Hunters and Props. The job of the Props is to become a prop (by pressing E while looking at it) then blend in somewhere. Hunters have to find these false imposter props and kill them. However, they loose 5HP for every real prop they shoot, so make sure you know what you’re shooting. The latest update allowed props to say a series of taunts to tease those (sometimes dumb) hunters!

The map is still just cs_office as I think this has the best number of props and is small enough so that you can actually find the props (sometime).

So, if you’ve got Garrys Mod, come join the fun at 193.200.158.235:27028. If you’ve got any suggestions relating to the server, let me know.

Secondary MX

July 2nd, 2008

I run my own home mailserver for two reasons, because I enjoy setting up systems and because I can. However, having just 1 mailserver introduces some problems. While according to the RFCs, sending servers are to keep sending failed mail for some time, they often dont. Consequently, if my server goes offline, loss of internet, reboot etc, I often loose a lot of email.

The solution to this is to have a Secondary MX (Mail Exchanger). This is another email server that will also accept email for your domain and keep trying to forward it to your Primary MX, forever. So, when my server comes back up, the email gets sent and not lost.

For a while, i’ve been using DNS Made Easy for my Secondary DNS and MX (don’t forget a secondary DNS, otherwise they can’t find out about your Secondary MX if your Primary DNS is down!). It worked, but not very well and recently i’ve noticed that i’ve been loosing email. DNS Made Easy have no information about their service status either, you have to trust that it’s working.

So, after searching for a while, I came across RollerNet. They provide many serivces, Primary/Secondary DNS/MX etc. I got a free account with them and was amazed at their quality of service. Most importantly, they give detailed logs of your MX status, such as mail received, mail in queue and the option to force-initiate a transfer of mail to your Primary MX. On top of that, they have all the usual spam filtering using the major blacklists, so no false-positives. Unfortunately, their free account has a limit of 50 messages a day (and many spammers target the Secondary MXes) so i’m now exceeding my message limit. No harm done though, i’m really impressed by their quality of service and going to take out a proper subscription. Good job RollerNet!

Google Checkout

June 27th, 2008

Customers of my game server business may have recently noticed that we’ve added a new payment method, Google Checkout. There have been many reasons driving this, both ones that benefit customers and me.

First of all, from the customer side, Google Checkout is much simpler to use and offers a lot more control over payment history. We’ve had a few customers who have had a bad experience with PayPal and refused to use it. However, unlike PayPal, Google Checkout can only accept a Credit/Debit card as a funding source, so you can’t pay using existing funds or a bank account. However, we found that most people used a Credit or Debit card anyway.

On our side however, it’s even better. While we have to hand-process each order (charging the card etc) the way is done is very good. Plus, we also get a lot more control over the order and like it is for the user side, the history is excellent. There is also the added benefit of having the Google Checkout badge on your AdSense results, which helps make your ad stand out.

One major factor that many might consider is fees. PayPal’s base rate is 0.25p + 4%. This can quickly mount up, with a £24 payment having over £1 in fees, and if you have micropayments it gets even worse. Google Checkout however has 0.15p + 1.5%, faw lower. It doesn’t stop there however, if you advertise using their AdWords service you get £10 worth of sales processed for free for every £1 in advertising you spend. So say you spend £10 on AdWords a month, that gives you £100 of sales processed for free (note: not £100 worth of fees). So the savings are even greater! (More lower prices I can pass on to users)

Perhaps the most interesting bit for us however is that payments are initated to our bank account daily. Unlike PayPal, where you have to get £50 first before you can withdraw. That’s upto £50 that you are not earning interest on and is completely under PayPal’s control.

I will however keep offering PayPal, while Google Checkout is far better when you compare it it has the disadvantage of being unfamiliar to users and not supporting Bank Account funding, so as not to alienate parts of my userbase i’m running both but reccomending Google Checkout.

Update: Got an email the other day from Google saying that I didn’t qualify to have the Google Checkout badge on my AdWords adverts. Apparently, they couldn’t find the badge, so they must just quickly check through. I emailed them back and they checked again and found it (you have to fill out an order form). While the AdWords badge isn’t particually important, it helps you stand out from competitors.

How to use FTP

May 17th, 2008

One thing i’ve come across while hosting games is the number of people that don’t know how to use FTP, or use a very bad method (i.e web based 3rd party FTP sites). So, i’m going to show you how to use FTP properly.

This tutorial is aimed at Windows users, those that use other operating systems will probably be able to follow these instructions with a bit of alteration.

First thing is to select your FTP client, which enables you to connect to the FTP server. While most operating systems have one, it’s quite lacking - it works but you’re going to have fun getting it to do that. Therefore, I recommend FileZilla, a free FTP client that works on most operating systems (Windows / Mac / Linux). I use FileZilla and hence it’s going to be the basis of this tutorial. Download it here. I’m going to assume you know how to use an installer.

Once installed, simply run FileZilla. On Windows, you will find it in Start > All Programs > FileZilla FTP Client > FileZilla. You should then be presented with the following screen;

FileZilla\'s Starting Screen

Lets go over the basic functionality of this screen. The boxes at the top that read “Host”, “Username”, “Password” and “Port” are where you enter the details of the FTP server you want to connect to, then click QuickConnect to connect to it.

The currently empty box under this will show you the status of the FTP, the messages it shows might not be understandable by you, but if you’re having problems with your FTP, the host will need to see this to help with your problem.

The box on the left shows your local files, on your computer. When connected, the box on the right will show the contents of the remote server.

Finally, the box at the bottom will show you the progress of your transfers, if you have any.

So, enter in the FTP information that your host gave you and click quickconnect. You can leave the port box blank unless your host has told you to use a port other than 21.

FileZilla Connected to the FTP

So, you’ve now connected, the box on the right is now filled with the contents of the remote server, if you’ve just got FTP access there might not be anything there - hence you have to upload files. The screenshot above shows me connecting to the FTP site for this blog, hence all the blog files are seen on the right side.

Now, I want to upload a picture, so I simply browse to the location of the picture on my computer on the left and drag the file I want to transfer over to the remote site on the right. Now at the bottom you can see that there is a progress bar showing how the transfer is going, along with an estimated time. If you transfer multiple files, then you will see multiple file transfers reported.

FileZilla During Transfer

It is that simple, and the process can work in reverse too, you can copy files from remote to local. FileZilla has many other features too, such as detecting when a local file is changed and prompts you to upload it. No matter what your needs, FileZilla can probably fufill them, plus it’s free!

I highly recommend FileZilla over any other solution, while others might have better features such as Synchronisation, they are not exactly free. If you’re currently using your operating system’s inbuilt FTP or another client which isn’t working for you, get FileZilla now.

Paid To Click - Easy Online Money?

May 10th, 2008

I recently got talking with someone about Paid to Click (PTC) schemes. These have been around since the early days of the internet- the concept being that you are paid to click on links and view websites, simple right? you’ll be earning money like no tomorrow.

Or not. It is possible to make money from PTC, and i’ll go into that later. However, for the most part, you’ll be earning small cash and wasting a lot of time. Mostly, there is a minimum view time requirement and you have to enter spambot-style picture codes to prove that you’re not a robot. At best, you’ll be earning $10 a month for a couple of hours work, even burger flippers earn more!

There are 2 ways to make money in PTC, the secret being to get someone else to do the work for you, i’m talking about referrals. Almost every PTC scheme has a referral program, you get a percentage of your referral’s earnings, and some even go down several levels. So, you can potentially earn money for doing nothing, get a few referrals and let them click away, and encourage them in turn to refer users. Now, this isn’t simple, but there are systems out there to help you. Forums such as Get Paid Forum have threads where you join using the referrer’s address above you, then post your own and people sign up under you and so on, this is a great way to start building your referral tree. From then on, it’s your own responsibility to get people to sign up under you, think of a few innovative ways to get people to do things for you.

Personally, I gave up on PTC, building a referral tree isn’t easy and while I was getting paid, it was peanuts, especially when those referrals under me also gave up and the money stopped coming in. Sure, I could have got more, but it was more work than I was prepared to do. I might retry it though, talking to this person has made me think about trying PTC again and test a few ideas i’ve got floating around to get lots of referrals.

There is however one “get paid for doing nothing on the internet” scheme that’s done well for me, and also has a minimum of effort. It’s the Gomez Peer, the concept is that you get paid for running a program on your computer. If the alarm bells are ringing at this point, turn them off. It’s not spyware, adware nor does it impact your system performance. The company that makes Gomez Peer, Gomez, are a large website testing service. They test the websites of big companies such as Microsoft, Google etc to see how they perform from many different internet connection types all over the world. While Gomez could buy computers and situate them around the world, it makes much more sense for them to get real people to do this and give them a little bit of money, Gomez saves money and people earn some, not bad I say.

So, if you want to try it out, click here to sign up. Once you’ve signed up, you’ll be asked to download the program, it’s 20mb. Once installed, it will start testing websites. You will not earn money until Gomez “approves” your account. This takes around 1-2 weeks, they use this period to see how committed you are going to be, they see how long your PC is on and when and if it matches their ideals, you’ll be accepted and start getting paid. I get paid around $10 per month just for running the program, plus in June they are going to start paying people 60% more - excellent. You can install the program on multiple programs to help increase your earnings.

So, if you want to make money for nothing, I strongly recommend the Gomez Peer. It might take time for them to approve your account, but they’ve always paid me on time and the right amount, plus i’ve done no work to earn it! Not bad at all I say. Also, they have quite a few methods of paying you, including PayPal.

And if you want proof, have a look below. This is screenshot form the account section of Gomez. As you can see, so far i’ve got $56.41 out of them, for doing nothing. I’d also post the PayPal payment as proof, but I can’t find it, next time I get paid I will update this post with the proof.

Gomez Peer Money Earnings

Gomez Peer Lifetime Earnings

(Oh, all the links in this post are referral links in case you didn’t notice. If you sign up for Gomez Peer and get accepted, I get $1. If you don’t want to give me this (doesn’t cost you anything remember) then simply remove the referrer bit from the URL)

CSRSS & CPU Usage

May 5th, 2008

Customers of my Game Server Company may have noticed recently that we moved to a new server (if you didn’t notice, you probably didn’t get the several emails I sent out informing you of progress every step of the way!). Anyway, I noticed today that between them, CSRSS.exe and Hardware Interrupts where taking up 25% of the total processing power, which is exactly one core (it’s a quad core server and since CSRSS isn’t multi core aware it can only max out 1 core).

Normally, CSRSS uses less than 1% of total CPU, and Hardware Interrupts only uses a lot of CPU if there is a problem (such as your disk drive being put into PIO mode). I adjusted the affinity of CSRSS so that it only used one core, and all of the hardware interrupts also happened then on that core. CSRSS was defiantly at fault here.

A quick bit of Googling lead me to MS KB 934330. This describes an instance where CSRSS uses more than 50% of CPU resources when connected via remote desktop, which is the problem I was experiencing (i’m assuming they are using just the 1 core). While there is no official patch, they have a hotfix available, and recently Microsoft have started being a bit more generous with Hotfixes, you don’t have to contact support any more - just get it sent straight to your email.

I applied the hotfix, rebooted and the problem had gone away - no more CSRSS using lots of CPU. If you also have this problem i’d reccomend applying the hotfix rather than let CSRSS waste your CPU cycles.

Oh, if you’re wondering how I viewed Hardware Interrupt CPU usage, I use Process Explorer - an excellent replacement for task manager, showing CPU to 2 decimal places, and lots of other handy features. Plus it’s regularly updated and free.

Dell Vostro 1500 Review

April 10th, 2008

Recently, I got myself a new laptop. After much searching around, I decided on a Dell Vostro 1500. Considering the price and specifications, it seemed like a good buy, and positive reviews outweighed negative ones. For a grand total of £609 delivered I got:

  • Processor: Core 2 Duo 2.4Ghz
  • 3GB Ram (1x 2GB, 1x 1GB. Reports operation in dual channel!)
  • nVidia GeForce 8600M GT 256MB
  • 250GB SATA Drive
  • Wifi
  • Bluetooth
  • 15 inch screen with resolution 1680×1050
  • Vista Business

A pretty beefy laptop in my opinion. It’s essential for me to have a beefy laptop; I do more than just websurf. My laptop goes almost everywhere with me and I like to play 3D games. Hence the graphics card. Having had it for just a few days, I’ve not had much of a chance to test it out much, but it seems to me like a pretty impressive laptop.

Gaming Performance

I tried a couple of games (Poral, TF2 etc), maxed out the settings (except AA) and ran them. Outstanding performance, little if any lag.

Input

The keyboard is excellent, really gives a feeling that the key has been pressed, as they go quite deep. They do make some sound, but that’s not a problem for me, when touch-typing having a sound help confirm that you did actually press the key. The touchpad is fairly standard, well integrated into the unit and has the usual scrollbars you’d expect. The Left/Right mouse buttons, like the keyboard, go deep and make a sound.

Screen

Having this resolution of screen on such a small screen is absolutely amazing. The picture is so clear and high quality, it puts to shame every other monitor I’ve seen. The screen itself has a higher resolution than Low HD (which most ‘HD Ready’ TVs are, and they are anything up to 40 inches remember). The text is a little small, but that doesn’t affect me and even if it was a problem, I’d just turn up the DPI. In fact, it’s probably better for someone with poor vision to get this screen and crank up the DPI than a lower resolution one since the characters are much clearer. The brightness isn’t as bright as I hoped, so you can only really use it in direct sunlight or shade, otherwise you see all the dust on the screen.

Sound

Usually, sound isn’t something important on laptops, you either have headphones or plug into a proper speaker set. Laptop speakers are notoriously tinny and horrible. However, as long as you have the laptop on a flat surface such as a desk, the speakers on this laptop reproduce the sound pretty well. Any other surfaces though, and you just get normal laptop sound. Audio lovers will wish of course to plug into the Hifi System or use their headphones. The quality of the sound that was produced really did surprise me.

Vista

Yes, I could have got XP on it but I caved into Vista, after all, this laptop should be powerful enough to run it and in fact, Vista isn’t that bad at all. I’ve used it occasionally, with mixed results, but with SP1 I cannot fault it much. Everything works perfectly, for a change!

Wifi

The Wifi used is the Intel 3495ABG chip. So if you still have an 802.11A network for some reason (I’ve never known anyone who has one) you’ll be fine. The performance it outstanding, I get an excellent signal almost everywhere, and the throughput seems good too. In addition, the WiFi switch has a 3rd mode, the Wifi Catcher; this will quickly scan all the networks and show their signal strengths in a dialog box. Not too useful unless you want to quickly see what networks are around.

LAN

The LAN connection is somewhat disappointing. It is only a 100mbit connection compared to the 1000mbit LAN card in my previous laptop. Not too much of a disappointment, but Dell could have easily put in a faster LAN card for not that much more!

Bluetooth

I chose to have the Bluetooth module installed, mainly for communication with my phone. Yes, I could use the USB cable etc but for working with other people’s phones etc, having the cable isn’t always an option. Plus it was only £15 extra.

Battery

I haven’t had a chance to test the full capabilities of the battery yet, but it seems to last around 3 hours going by the estimates. One interesting feature is a button on the bottom of the battery which lights up 5 LEDs, depending on the charge of the battery. Useful if you have multiple batteries and don’t want to plug each one in to find the charge.

Power Adaptor

The power adaptor is dell’s standard one, with the large white tipped connection to the laptop. The power brick itself comes with a strap, which is useful for keeping the cord tidy when carrying it around. A lot better than stuffing the cord into a bag and having to spend ages untangling it next time it’s taken out.

Media Buttons

On the front of the laptop are several ‘Media Keys’ for Play / Pause / Next / Previous / Volume etc. Very useful and they light up when you press them. Would be nice if they where lit all the time in AC mode.

Size

The Vostro is fairly thick and heavy, but considering the power of it (and hence the cooling requirements) I’m not surprised. Weight is not a huge problem for me, I have a laptop backpack as opposed to a shoulder bag so it distributes the weight more evenly (I highly recommend these to everyone). The size is that of a normal 15″ inch laptop, just a little thicker, which is not a problem! I don’t see why people are obsessed with having a laptop as thin as possible, it doesn’t really matter that much!

Well, that is it. My review. Overall, I’m very pleased with this laptop. Hopefully it will stand the test of time. If you’ve got any questions about it, ask me!

Update: Here are a few (rather bad) pictures.

Update: Couple of Weeks Later

Now that i’ve had this laptop a bit longer, it’s time for an update!

I eventually wiped the laptop of Vista and put XP on, with Service Pack 3. This included wiping all of Dell’s partitions including the MediaDirect one. I never use recovery partitions, nor media direct so no loss there and I’ve regained around 30 GB of disk space.  XP runs a lot faster too, gaming performance has improve. There was nothing especially wrong with Vista, apart from the fact that it slowed down the computer a bit. The only thing I miss from Vista is seamless off-line files sync, but I can cope without that and would rather have the performance boost any day.

The laptop has performed flawlessly though, there was a slight issue with getting bluetooth working. To use it, the drivers had to be installed. However, it could only be installed if it was switched on, but switching on requires the drivers! Hence, you can’t use bluetooth. However, I came across a file on Dell’s FTP that enabled it, I can’t remember what it was but a Google search will probably find it.

So was it worth it? Yes, completely. However, it seems now that Dell have stopped putting Graphics Cards in the Vostro 1500. I don’t care if you don’t game - you have to have a graphics card! Therefore, I recommend the 1700, which is identical but is 17″, less portable but just as powerful and roughly the same price as my 1500 was.

Update 2: A friend of mine has recently got the 1710. He left it in my care to upgrade it to XP and i’ve got to say, it’s a great laptop. Only slightly bigger than my 1500 but i’d still be ok with carrying it around, plus you’ve got the bigger 1920×1200 screen and full keyboard. It’s also somewhat thinner. The 1710 is now my reccomended vostro for purchase!

Easy Equations in MediaWiki

March 25th, 2008

If you’ve ever set up MediaWiki, you will probably know how difficult it is to get equations (or LaTeX rendering / math tags) working. Under windows, it requires a lot of tweaking, ImageMagick support, a full LaTeX install and in quite a few cases fails to work. While trying to get equation rendering working on my personal (read, private!) wiki, I came across an interesting solution to this problem. Simply put, it is in extension which interprets <tex> tags and then sets the image URL to that of an image generated by a CGI-Script on another page. This means that no LaTeX or ImageMagick support is needed on the localhost.

The full details of how to get this working are documented here. It is very simple to set up, with the only drawback being that you have to use <tex> tags instead of <math> tags.

If you are interested in the script itself, perhaps to use it for something other than a Wiki, you can visit the creator’s site here. If you have a large wiki or other project however, it is recommended that you host the CGI script yourself to reduce the load on the server that provides this free LaTeX equation rendering.