wp-server-stats icon indicating copy to clipboard operation
wp-server-stats copied to clipboard

Warnings logged

Open robertoschwald opened this issue 2 years ago • 1 comments

The following warnings are logged. Checked with Query Monitor plugin, but you can enable server logs to see it as well:

  1. Trying to access array offset on value of type bool wp-content/plugins/wp-server-stats/wp-server-stats.php:249 Plugin: wp-server-stats

  2. Warning file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 wp-content/plugins/wp-server-stats/wp-server-stats.php:239 Plugin: wp-server-stats

  3. Warning file_get_contents(http://ip-api.com/php/xxx.xxx.xxx.xxx): failed to open stream: no suitable wrapper could be found wp-content/plugins/wp-server-stats/wp-server-stats.php:239 Plugin: wp-server-stats

Maybe add support for MaxMind, so location info is taken from local database if needed.

robertoschwald avatar Mar 01 '22 19:03 robertoschwald

For the allow_url_fopen=0 warning, I strongly recommend to either check if allow_url_fopen is enabled e.g.

if( ini_get('allow_url_fopen') ) {
}

or use curl_exec()

robertoschwald avatar Dec 22 '22 13:12 robertoschwald