New PHP Breaks WP-ShortStat

So, I just upgraded this server to PHP 5.0.5 with the 0.4.2 hardening patch. All seemed to be going well until I tried to look at my WordPress ShortStat page. It no longer loads from within my WordPress dashboard. WP-ShortStat is a plugin for WordPress that’s based on ShortStat by Shaun Inman. When I say ShortStat I mean the WordPress plugin, WP-ShortStat.

The table that stores ShortStat data has roughly 150,000 records. ShortStat is still logging statistics to the database table, it’s method for displaying the data within the WordPress dashboard is just broken. Very annoying as I very much enjoy watching the ShortStat page for this blog. I’ll either fix it tonight or find some other method for tracking visitor stats.

The end user shouldn’t notice anything different in the functionality of the site.

UPDATE: After commenting out the following piece of code on line 605 of wp-shortstat.php everything works fine.

gmdate("g:i a j M Y",$wpss->getFirstHit()+(((gmdate('I'))?
($wpss->$tz_offset+1):$wpss->$tz_offset)*3600));

Take not that if you remove the code listed above from line 605 of wp-shortstat.php, the date will no longer display at the top of the “Hits/Uniques” section. The date displayed there is the very first date WP-ShortStat started logging. So that’s the only adverse effect you should notice from removing that line.

0

Well, now what?

Work with Me

I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!

Leave some Feedback

Got a question or some updated information releavant to this post? Please, leave a comment! The comments are a great way to get help, I read them all and reply to nearly every comment. Let's talk. πŸ˜€

Longren.io is proudly hosted by DigitalOcean

DigitalOcean

3 thoughts on “New PHP Breaks WP-ShortStat

  1. Pingback: basil's blog
  2. If you change the

    gmdate(“g:i a j M Y”,$wpss->getFirstHit()+(((gmdate(‘I’))?
    ($wpss->$tz_offset+1):$wpss->$tz_offset)*3600));

    to

    gmdate(“g:i a j M Y”,$wpss->getFirstHit()+(((gmdate(‘I’))?
    ($wpss->tz_offset+1):$wpss->tz_offset)*3600));

    everything will work as before. πŸ™‚

    0
  3. Excellent. Thanks for the tip Seraph! I hadn’t gotten much of a chance to really figure out why the original code wasn’t working. Glad you’re around. πŸ™‚

    0

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.