Tag: PHP

Important Update for WP Statistics Users: PHP Version Requirement Changes

We’re committed to providing our WP Statistics plugin users with the best experience, ensuring compatibility, security, and performance are at their peak. With technological advancements and to maintain our promise, we’re making an essential update to our PHP version requirements. New PHP Version Requirement Starting from Version 15 of the WP Statistics plugin, PHP 7.2 […]

How to Sanitize user IP?

If the IP value returned from your server has a special character,you can use:wp_statistics_sanitize_user_ipfilter in your WordPress for getting real user IP from your $_SERVER. For example:If your $_SERVER: 192.000.000.1, 192.000.000.2, 192.000.000.3And your real IP is: 192.000.000.1You can use a final filter like this: Or if your $_SERVER: for=192.000.000.1;proto=http;host=site.comAnd your real IP is: 192.000.000.1Use this […]

How to Stop Tracking in WP Statistics with PHP code?

Sometimes you need to enable the Anonymize IP Addresses with PHP code for GDPR. Here is an example to do that. add_action(‘init’, function (){ global $WP_Statistics; $WP_Statistics->update_option( ‘anonymize_ips’, ‘1’ ); });

WP Statistics 11.01 Parse Error

When I upgrade or install WP Statistics 11.0 I get an error message like “Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION in…” Since WP Statistics 11.0, PHP 5.4 or above has been required. If you are using an older version of PHP it cannot understand the new syntax included in WP Statistics 11.0 and […]

My overview screen is blank, what’s wrong?

This is usually caused by a PHP fatal error, check the page source and PHP logs. The most common fatal error is an out of memory error. Check the Statistics->Optimization page and see how much memory is currently assigned to PHP and how much the overview is using. If it is a memory issue you […]

When I upgrade or install WP Statistics I get an error message

When I upgrade or install WP Statistics I get an error message like Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or ‘(   Since WP Statistics 8.0, PHP 5.3 or above has been required. If you are using an older version of PHP it cannot understand the new syntax included in WP Statistics 8.0 […]

I’m using another statistics plugin/service and get different numbers for them, why?

Pretty much every plugin/service is going to give you different results for visits and vistors, there are several reasons for this: Web crawler detection Detection method (javascript vs server side PHP) Centralized exclusions Services that use centralized databases, like Google Analytics, for spam and robot detection have better detection than WP Statistics can. The trade […]

GeoIP is enabled but no hits are being counted?

The GeoIP code requires several things to function, PHP 5.3 or above, the cURL extension and PHP cannot be running in safe mode. All of these conditions are checked for but there may be additional items required. Check your PHP log files and see if there are any fatal errors listed.