Sorry about the slow reply, but I have been on vacation as well.
The log_visit table shows entries for web page 1, but not for web page 2. Both are on a different domain running Joomla. I added the code piece into a banner file and I used Firebug to verify that it gets executed when the page is loading.
I also checked the php log file and I don’t see any issues. Memory is set to 256MB. I would assume that this is enough.
In addition I also checked loading the URL directly and both load into an empty page without an error message. I am assuming that is working as designed.
Now, the strange part is that if I load the URL directly I actually do see an entry for web page 2. I will look around some more, but I am not sure where the problem is.
Update: According to Firebug only the first page loads the banner item containing my code. The second page only shows the bannergroup, but not the banner item being loaded. Therefore I assume that this is a Joomla problem. This could be a database problem or a Joomla bug. Not sure yet… Will post on the Joomla forum.