26 Sep

Anyone Else having Issues with VPS

Weird issue on my sites recently. I have one VPS account with Plesk and the ports all get locked in a ‘CLOSE_WAIT’ state. Using ‘netstat -p” shows its usually httpd locking them up. Restarting VPS will get the ports unlocked but in investigation I found restarting Apache from the Unix command line does the trick to.

Anyone have any experience with this type of issue and how to fix it?… Read the rest

24 Sep

More on PHP Error Handling

OK so I’ve been talking about PHP errors for a while now but one more post. I found some code for customizing error handing in PHP , I installed it and got overwhelmed with emails reporting errors on my sites. I had to spend most of yesterday fixing issues on my sites. Most were minor issues of course – the worse is using uninitialized variables such as $ret = $Data[‘notset’]; where the value in $Data hasn’t been set. In reality the code works and its being pedantic but it still needs fixing with:

$ret = isset( $Data[‘notset’] ) ? $Data[‘notset’] : “” ;

But some reports were real errors, such as unitialised variables that needed a value, referencing arrays using -> instead of [], and other nasties.… Read the rest

19 Sep

Google Analytics Cross Domain Setup

I recently had quite a problem with a site that used a different website name for the checkout process compared to the regular non-secure site. For example non-secure site is www.site.com, secure site is secure.site.com. This is addressed in the Google Analytics FAQ in a number of places, mostly to do with 3rd party shopping carts which doesn’t really apply here. In addition this issue is mentioned by a number of other people but their solutions were missing something as well.

After much digging around and wrong turns from the Google Analytics FAQ I came up with the following code that seems to handle this situation perfectly.… Read the rest

10 Sep

One of our sites was hacked

Put in a whole bunch of PPC (pills porn casino) links and we only noticed because the site wasn’t ranking when it should have, and by looking at the source code. The sire is pure HTML, no applications installed. How the heck they got in I don’t know, all I can assume is they got into the box through someone else’s site and added these links. Now I have to spend time cleaning it all up. Were do I send the bill for the cleanup?… Read the rest

10 Sep

Site Performance

The speed your site responds to queries is used as part of the overall ranking algorithm – sites that don’t respond at all are likely to get dropped from search engine indexes. Therefore turning on any performance enhancements you can is a must if you want to maintain rankings.

To that  end I’ve been working on performance on our sites. My previous post was about turning on PHP errors and correcting them. One page on an internal site went from taking a few minutes to render to under 20 seconds all because I had $$var instead of $var in one line in a loop.… Read the rest