Problem With Google Analytics Module in OS X

I’ve installed the module successfully by building a custom apache with mod_perl2. That part works fine.

The problem is very strange, if a Webpage is more than 150 lines, the page cuts off right where the Google Analytics code gets inserted.

See Example:
http://www.tonysoffthird.com/test.html

It works great on my Ubuntu servers, but this company insists on using Max OS X.

Any clues in the error_log? This seems like there must be an error somewhere…either mod_perl2 isn’t working, or the code that inserts the tag is broken somehow.

Their is nothing in the error log, and nothing in the system log. Does this module have it’s own log?

I don’t think so. Now that I’m looking at this, we’ve seen this before in the issue tracker (also on a system with a from-source install of Apache). I’m pretty sure it was a problem with the mod_perl build. I’ll see if I can find that issue in the tracker.

Hmm…OK, so I found one issue about this, but it never got resolved–we’re still awaiting a response from the user.

Do other mod_perl applications work?

So is this a problem with mod_perl2 or the Analytics module? I’m not a perl programmer but is their some direction you can point me in? I want to see if it’s possible to split the data the perl filter outputs so it doesn’t cut off.

This is the only mod_perl I use on the server. However, I was able to experiment with the perl module /usr/local/webmin-1.441/virtualmin-google-analytics/Virtualmin/GoogleAnalytics.pm

Te problem for me is around line 68 and 71:

    $buffer = $1.$addscript.$2.$3;
        $added = 1;
}
    $f->print($buffer);

If I trim off the "$1" the google code and the rest of the document prints. However with the "$1" gone, if a add something like this: $f->print("HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello");
right before $buffer = $addscript.$2.$3; the document cuts off again.

It’s almost as if it’s too much for mod_perl to print out.