WassUp – SPY Visitors page will not display due to Fatal error mentioned. Anyone have ideas to solve this error?
Plugin Contributor
helened
(@helened)
Thank you for reporting this error.
A geolocation api lookup failure in SPY Visitors has triggered this error. This happens when your WP site is is not communicating over the internet or when the remote geoip api server is not responding.
SPY Visitors requires internet access. If your WordPress host server is connected to the internet and not on a local, stand-alone machine, then there may be a misconfiguration in your WordPress setup or the API server that Wassup uses could non-responsive. Please reply if your host server is connected. I will check into whether there’s a problem with the remote API server.
My host server is connected to the Internet. What specific settings does WordPress need? I am only using three Plugins: All In One SEO Pack, Sociable and WassUp Real Time Analytics.
Plugin Contributor
helened
(@helened)
The API service is working, so the API server is rejecting the request from your host server only. This could mean that the request limit has been exceeded for your host server, or a spammer may have used your same shared host in the past, or some internal configuration issue is causing WordPress’ wp_remote_get command to fail inside Wassup.
I don’t know how to fix the latter without full access to your server. Instead, you could try this temporary fix to remove wp_remote_get from Wassup’s code:
Use WordPress’ plugin editor to comment-out the following if-end-if block of code inside the plugin function wFetchAPIData() on lines 2068-2078 of the file, wassup/lib/main.php:
//try WordPress WP 2.7+ function 'wp_remote_get' for api results
if (function_exists('wp_remote_get')) {
$opts = array('user-agent'=>"$wassup_agent");
$api_remote=wp_remote_get($api_url,$opts);
if (!empty($api_remote['body'])) {
$apidata = $api_remote['body'];
} elseif (!empty($api_remote['response'])) {
$apidata = "no data";
}
$api_method='wp_remote_get'; //debug
}
These lines are located near the very bottom of wassup/lib/main.php. To comment them out, just insert a new line with /* before the first line of code block, then append a new line with */ after the last line of code block, and update.