Unexpected token "=>" in fc-geoIP-all.php

I have an error in php_error_log that looks like this:

PHP Parse error: syntax error, unexpected token “=>” in C:\xampp\htdocs\journal\cache\fc-geoIP-all.php on line 6998

6998 in this case happens to read:

line 6998: ); ‘16bdb9c7dbeeb9ac82fa4b16f26cc3a150a2dcd7eafaff2e1b753a85f26e5899’ =>
array (
‘country’ => ‘CA’,
‘region’ => ‘ON’,
‘city’ => ‘Toronto’,
),
);

and is the last line in the fc-geoIP-all.php file in the cache directory. I stop Apache, delete the fc-geoIP-all.php, restart the server and the error stops showing in the error log for a while, until the newly recreated fc-geoIP-all.php reaches a point where it starts generating the error again, thousands of lines a day. I tried to find a plugin or journal settings that call for the use of geoIP but couldn’t.

I figured it out. Since the Usage Stats plugin has been removed in 3.4 and statistics are now part of the core application, going to Administration / Site Settings / Statistics and switching from “Collect the visitor’s country, region and city” to “Do not collect any geographical data” stopped the fc-geoIP-all.php from being regenerated and the related errors are gone.

This topic was automatically closed after 9 days. New replies are no longer allowed.