Title: Error After Update  (parse-user-agent.php)
Last modified: August 30, 2016

---

# Error After Update (parse-user-agent.php)

 *  Resolved [ensiyeh](https://wordpress.org/support/users/ensiyeh/)
 * (@ensiyeh)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/)
 * Good day,
    I have been using this plugin with no problems for a while now but
   since the new update I started getting blank page on my site which I noticed 
   was for this plugin. I have deleted the plugin and installed the new version 
   and this is the error I receive trying to activate it: Fatal error: Function 
   name must be a string in /…/wp-content/plugins/wp-statistics/includes/functions/
   parse-user-agent.php on line 123
 * Can you please help me resolve this.
 * [https://wordpress.org/plugins/wp-statistics/](https://wordpress.org/plugins/wp-statistics/)

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Thread Starter [ensiyeh](https://wordpress.org/support/users/ensiyeh/)
 * (@ensiyeh)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285276)
 * Some of error from error-log
 * Lost connection to MySQL server during query SELECT SQL_CALC_FOUND_ROWS wp_posts.
   ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = ‘post’ AND (wp_posts.post_status
   = ‘publish’ OR wp_posts.post_status = ‘private’) ORDER BY wp_posts.post_date 
   DESC LIMIT require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query-
   >query, WP_Query->get_posts
 *  PHP Fatal error: Function name must be a string in /…./wp-content/plugins/wp-
   statistics/includes/functions/parse-user-agent.php on line 123
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285334)
 * What version of PHP are you running? What version of WP Statistics did you upgrade
   from?
 * The first part of the error above (the Lost connection part) isn’t related to
   WP Statistics.
 *  [ellitedevs](https://wordpress.org/support/users/ellitedevs/)
 * (@ellitedevs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285390)
 * Hi,
 * I am also getting the same error at [http://pragatiprakashan.in](http://pragatiprakashan.in)
 * Plugin could not be activated because it triggered a fatal error.
    Fatal error:
   Function name must be a string in /…/wp-content/plugins/wp-statistics/includes/
   functions/parse-user-agent.php on line 123
 * Plugin version: 9.3.1
 *  Thread Starter [ensiyeh](https://wordpress.org/support/users/ensiyeh/)
 * (@ensiyeh)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285391)
 * Hi,
 * Running PHP version: 5.4.41
 * Currently I have 9.3.1 installed. I am not sure what the previous one was.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285405)
 * Can you try disabling your other plugins?
 * Also try the following:
 * 1. Create a “test.php” file in the “wp-statistics/includes/functions” folder 
   in your WP plugins directory.
 * 2. Add the following to the test.php:
 *     ```
       <?php 
   
       include( 'parse-user-agent.php' );
   
       print_r( parse_user_agent() );
   
       ?>
       ```
   
 * 3. Access the file in a browser:
 *     ```
       http://[Your site name]/wp-content/plugins/wp-statistics/includes/functions/test.php
       ```
   
 * It should output something like:
 *     ```
       Array ( [platform] => Windows [browser] => Firefox [version] => 38.0 )
       ```
   
 *  [ellitedevs](https://wordpress.org/support/users/ellitedevs/)
 * (@ellitedevs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285434)
 * Hi Greg,
 * I tried disabling all other plugins, it’s still not working.
 * As for the PHP file it isn’t giving any output.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285441)
 * Can you check your PHP error log and see if the script generated the same error
   as the plugin?
 * If it did, it may be a bug in the version of PHP, does your hosting provider 
   offer a newer version of PHP you can try?
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285458)
 * Also check to see if your PHP install has eAccelerator.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285498)
 * Closing due to inactivity.
 *  [Libin](https://wordpress.org/support/users/libinvbabu/)
 * (@libinvbabu)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285509)
 * I’m having this same error. Tried test.php as you mentioned here. Getting blank
   page for that.
    I’m running on php 5.4.42
 * Any help will be appreciated.
 *  [Libin](https://wordpress.org/support/users/libinvbabu/)
 * (@libinvbabu)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285510)
 * I replaced the “**parse-user-agent.php**“with another file from ver 7.0 ([http://plugins.svn.wordpress.org/wp-statistics/tags/7.0/includes/functions/parse-user-agent.php](http://plugins.svn.wordpress.org/wp-statistics/tags/7.0/includes/functions/parse-user-agent.php))
   and everything is working fine now.
 * Hope this may help someone.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285511)
 * Libin: are you using eAccelerator? If so it’s a bug in eAccelerator.
 * If not, can you try a different version of PHP from your hosting provider?
 *  [Libin](https://wordpress.org/support/users/libinvbabu/)
 * (@libinvbabu)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285512)
 * eAccelerator is not installed. I think 5.4.42 is a stable version. I will try
   to get a new php version.
 *  Thread Starter [ensiyeh](https://wordpress.org/support/users/ensiyeh/)
 * (@ensiyeh)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285513)
 * I changed the php version and It is fine. Ran into some other problems with the
   theme wich I am working on. Thanks for the help.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285514)
 * [@ensiyeh](https://wordpress.org/support/users/ensiyeh/): No problem, there seems
   to be a bug with anonymous functions in PHP 5.4.? but I can’t reproduce it on
   my 5.4 install so it’s hard to track down.
 * [@libin](https://wordpress.org/support/users/libin/): Let me know if you have
   any success with the new version.
 * I’m going to do some work on the user parsing code to get rid of the anonymous
   function call and submit it back to the original author of the library.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Error After Update (parse-user-agent.php)’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 15 replies
 * 4 participants
 * Last reply from: [Greg Ross](https://wordpress.org/support/users/gregross/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/error-after-update-parse-user-agentphp/#post-6285514)
 * Status: resolved