Server Administration

xcache Revisited

In an earlier post, I complained about xcache 1.2.1 doing nothing but bad things to my server. I ended up moving to eAccelerator for a while instead. Recently, I moved to some better hardware to handle my ever-increasing traffic, and decided to give xcache another try. Low and behold 1.2.2 is out (and has been for a while it seems).

With the aid of a few plugins, I now have over 500 var caches running in xcache along with many php scripts themselves in the cache. My loads are WAY down (but, most of that can be contributed to the better hard ware) and page load times is MUCH faster.

I like it. And i retract my previous statements about it. Well done.


SEO in a world where the “SE” doesn’t “O”

I spend a ton of time working on SEO aspects of sites I work on. I’m also a pre-release team member over at vBSEO, a 3rd party SEO software add-on for vBulletin forums. Today, I question why I do this.

The ‘big daddy’ Google can’t even seem to get their sub domains correct.
all go to the same place.

Both the maps and mail sub domains should 301 re-direct to regular www.

This is an epic duplicate content failure on all accounts. It is possibly the greatest oxy-morons of all time. No one “searches” for Google (ok, maybe a few random’s go to and search for “google” to get there…), so they seem exempt from anything relating to SEO. Yet, their algorithms penalize websites with duplicate access points.

This is not a difficult ‘final tweak’ either. This is an entry level SEO consideration. Moreover, it can have negative effects on the application itself, such as cookies hitting mix-matched domains.

Maybe Matt Cutts will grace us with a reply here 🙂


IE6 AJAX hang on readyState 3

I recently ran into a problem that took me a few days to find a work around for. Running a basic AJAX POST, IE6 would hang up on readyState 3 for 200 seconds, throw an “Unspecified Error“, and then finally perform the action. Having a user wait 200 seconds for the IE6 timeout to come into effect is simply not a solution. All other browsers I tested, including IE7, were not having this problem.

I read on the web that this may come from SSL or from compression on the webserver. I bypassed our SSL check entirely, and it still happened. I did not mess with the servers for http compression though. To me, that is NOT an option to disable. Bandwidth costs would be too much to even consider this a viable solution.

So, I returned to the programming aspect of it. There has to be a code fix somewhere.

Long story short, IE6 doesn’t handle connection closures properly. A typical request looks something like:

function doajax() {
var url = "/script.php";
var params = "x=123&y=456";

//add timestamp to pass a unique param each time to prevent ie caching the ajax object
timestamp = new Date();
tim1 = (timestamp.getTime());
sec1 = timestamp.getSeconds();
ms1 = timestamp.getMilliseconds();
thetime = tim1+sec1+ms1;
params += "&rand="+thetime;'POST',url,true);
xmlHttp.onreadystatechange = alertContents;
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader('If-Modified-Since','Tue, 04 Apr 2006 00:00:00 GMT'); //some date in the past
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");

The line in question here is

xmlHttp.setRequestHeader("Connection", "close");

Since this header is effectively applied for each readyState, it ends up hanging up on readyState 3.

The easy fix:
Target ie6 (and other old browsers) to not close the connection.

change the above snippet to:

if(!document.all) {
xmlHttp.setRequestHeader("Connection", "close");

I’m not 100% sure of the implications involved in NOT closing the connection, but I haven’t seen any performance impact, and this cleared up the bug right away. No JS errors, and no 200 second waiting. Give it a try and let me know if it works for you as well.


Freelance Programming Feedback

This post contains comments from people whom I’ve done custom work for in the WordPress, vBulletin, and vBSEO worlds. I’ve asked those that I’ve worked with before to leave a few words here about my quality of work.

If I’ve done work for you, please leave a few words so others who are considering working with me know that I’m legit and can deliver as promised.


Programming Server Administration

WordPress Permalinks on IIS with ISAPI_Rewrite

I’ve run WordPress here on my CentOS box for nearly 4 years and am quite familiar with the software. Recently, I had a client on a Windows system request a blog be added to their web store. Their webstore is written in ASP and runs on windows. They wanted to stay on the same domain for SEO purposes, (thus instead of or a new .com). Without the subdomain or new IP, there’s no way to change DNS for a subdirectory to a different server. This meant I had to get it working on IIS.

Native installations for apache tend not to port well (or perhaps, easily) over to windows/IIS. Thankfully, ISAPI3 from supports .htaccess files and makes the job a little easier. WordPress works fine on windows/IIS until you want nice permalinks.

After MUCH searching, testing, and error log analysis, I’ve got a working solution for Windows Server 2003 with ISAPI_Rewrite 3.1.x, running php 5.2.x and mysql 5.0.x community.

  1. index.php should be set up in IIS as a default document (same place you find default.asp, index.htm, etc)
  2. edit wp-settings.php

    at the very top of the file.

    Replace with:

  3. create the following htaccess file with the Helicon Manager:

    RewriteEngine On

    #RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . /blog/index.php [L]

    • Note: You may need to alter the RewriteBase or the last rule to your specific location. In my particular case, I was installed on

From here, you can edit your permalink structure as you normally would. If the default options has index.php/ as part of the rule, you can remove that.


Dreading Tax Season

Every year around this time, I start getting nervous. The fear of getting audited constantly crosses my mind. No accountants around me have a clue about internet marketing. It really is a special niche that most have zero experience with. This is the conversation I had with the last 3 places I called:

ME: Hi, I’m looking to chat with someone experienced with internet marketing income to help me with my taxes.
ACCOUNTANT: ohh, so you run a store?
ME: No, I get paid 1099-misc by many 3rd parties for running their ads and marketing for them.
ACCOUNTANT: Wait, you make money without selling anything?
ME: Yes, I run ads for them on my forums, blogs, and other websites promoting their products, services, etc, of which I get a cut if there’s a sale or a click, depending on the type of ad.
ACCOUNTANT: So you don’t have an inventory?
ME: Thanks for your time.

While I’m sure they are smart with numbers, I simply can’t trust in good faith someone who doesn’t have a clue about the type of business I’m in to make the best business tax choices for me.

On top of all my web income and expenses, I also work W2 with a ‘real’ 9-5 type job. Then, there’s my 401k, my stocks that i’ve bought, sold, and earned dividends on, bank account interest, mortgage interest, my local/state income, property, and car taxes, the percent sq.ft of my dedicated office on my house that I get to write off for a business expense and so on and so forth. At the end of the day, my taxes suck.

To make matters worse, I have an ever-growing pile of tax forms on the floor of my home office.

Tax Forms

The worst part is that I’m still expecting a couple forms in the mail.

Do you dread Tax season as much as I do?