Title: PHP Errors in server log
Last modified: June 18, 2024

---

# PHP Errors in server log

 *  Resolved Anonymous User
 * (@anonymized-14169293)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/)
 * My server logs are full of these errors:
 *     ```wp-block-code
       FastCGI sent in stderr: "PHP message: PHP Notice:  iconv(): Detected an illegal character in input string in /var/www/example.com/htdocs/wp-content/plugins/matomo/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php on line 296;
       ```
   

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

 *  Plugin Support [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * (@dizzyatinnocraft)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834311)
 * Hi @qrokes can you tell me if you’re using MaxMind’s GeoIp database? If so, can
   you tell me which one(s)?
 *  Thread Starter Anonymous User
 * (@anonymized-14169293)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834316)
 * Hi, [@dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
   thanks for your fast response.
 * No, I’m not using MaxMind.
 *  Plugin Support [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * (@dizzyatinnocraft)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834323)
 * One other question, are you seeing data in the Matomo location reports (ie, the
   reports in the `Matomo Analytics > Reporting > Visitors > Locations` page)?
 *  Plugin Support [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * (@dizzyatinnocraft)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834327)
 * And one other question: what version of the plugin are you using?
 *  Thread Starter Anonymous User
 * (@anonymized-14169293)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834328)
 * Version: 5.1.0
 * Yes, I can see the “Visitors – Locations” report.
 *  Plugin Support [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * (@dizzyatinnocraft)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834331)
 * Can you try replacing the `/path/to/wordpress/wp-content/plugins/matomo/app/plugins/
   GeoIp2/LocationProvider/GeoIp2/Php.php` file with the contents of this one: [https://raw.githubusercontent.com/matomo-org/matomo-for-wordpress/b4a7ef4c53d8dec0d2bbd790fb21919ca328c86d/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php](https://raw.githubusercontent.com/matomo-org/matomo-for-wordpress/b4a7ef4c53d8dec0d2bbd790fb21919ca328c86d/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php)
   and see if the notice goes away?
 *  Plugin Support [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * (@dizzyatinnocraft)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834332)
 * Actually, ignore that last message.
 *  Plugin Support [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * (@dizzyatinnocraft)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834333)
 * Ok, instead, can you try replacing the `/path/to/wordpress/wp-content/plugins/
   matomo/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php` file with the contents
   of this one: [https://raw.githubusercontent.com/matomo-org/matomo-for-wordpress/2cdc997527b204867e36bc4a722bbd942bd8d849/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php](https://raw.githubusercontent.com/matomo-org/matomo-for-wordpress/2cdc997527b204867e36bc4a722bbd942bd8d849/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php)?
 *  Thread Starter Anonymous User
 * (@anonymized-14169293)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17834334)
 * Ok. Today I updated from 5.0.8 to 5.1.0, so first let me see the logs with this
   new update. If tomorrow I still see the same error, then I will try the new code
   you posted.
 *  Thread Starter Anonymous User
 * (@anonymized-14169293)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17836167)
 * I can confirm that this issue is still happening in v5.1.0. It happens in the
   middle of the night when nobody is logged in using the WP admin area.
 *     ```wp-block-code
       PHP message: PHP Notice:  iconv(): Detected an illegal character in input string in /var/www/example.com/htdocs/wp-content/plugins/matomo/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php on line 295; PHP message: PHP Notice:  iconv(): Detected an illegal character in input string in /var/www/example.com/htdocs/wp-content/plugins/matomo/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php on line 295" while reading response header from upstream, client: 88.130.127.37, server: example.com, request: "POST /wp-content/plugins/matomo/app/matomo.php?action_name=Optimized%20Page%20Web%20Home%20%C2%BB%20Example&idsite=1&rec=1&r=256400&h=10&m=34&s=59&url=https%3A%2F%2Fwebinoly.com%2F&_id=f18246f38be07d15&_idn=0&send_image=0&_refts=0&pv_id=tsGSVB&pf_net=275&pf_srv=160&pf_tfr=144&pf_dm1=498&uadata=%7B%22fullVersionList%22%3A%5B%7B%22brand%22%3A%22Google%20Chrome%22%2C%22version%22%3A%22125.0.6422.176%22%7D%2C%7B%22brand%22%3A%22Chromium%22%2C%22version%22%3A%22
       ```
   
 *  Thread Starter Anonymous User
 * (@anonymized-14169293)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17836676)
 * Using the modified file you sent me, I’m now getting a new error:
 *     ```wp-block-code
       FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot declare class Piwik\Plugins\GeoIp2\LocationProvider\GeoIp2\Php, because the name is already in use in /var/www/example.com/htdocs/wp-content/plugins/matomo/app/plugins/GeoIp2/LocationProvider/GeoIp2/Php2.php on line 29" while reading response header from upstream, client: 186.122.88.17, server: example.com, request: "POST /wp-content/plugins/matomo/app/matomo.php?action_name=Nginx%20y%20las%20limitaciones%20de%20FastCGI%20Cache%20%C2%BB%20Ejemplo&idsite=1&rec=1&r=055560&h=14&m=6&s=56&url=https%3A%2F%2Fexample.com%2Fes%2Ftutorial%2Fnginx-purge-fastcgi-cache%2F&urlref=https%3A%2F%2Fwww.google.com%2F&_id=0204683d1b4caf91&_idn=0&send_image=0&_refts=1718816816&_ref=https%3A%2F%2Fwww.google.com%2F&pv_id=5yN8ub&pf_net=0&pf_srv=1&pf_tfr=8&pf_dm1=178&uadata=%7B%22fullVersionList%22%3A%5B%7B%22brand%22%3A%22Not%2FA)Brand%22%2C%22version%22%3A%228.0.0.0%22%7D%2C%7B%22brand%22%3A%22Chromium%22%2C%22version%22%3A%22126.0.6478.61%22%7D%2C%7B%22brand%22%3A%22Google%20Chrome%22%2C%22version%22%3A%22126.0.6478.61%22%7D%5D%2C%22mobile%22%3Afalse%2C%22model%22%3A%22%22%2C%22platform%22%3A%22Windows%22%2C%22platformVersion%22%3A%2215.0.0%22%7D&pdf=1&qt=0&realp=0&wma=0&fla=0&java=0&ag=0&cookie=1&res=1920x1080 HTTP/3.0", upstream: "fastcgi://127.0.0.1:9000", referrer: "https://example.com/es/tutorial/nginx-purge-fastcgi-cache/"
       ```
   
 *  Plugin Support [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * (@dizzyatinnocraft)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17837496)
 * @qrokes there shouldn’t be a “Php2.php” file there, did you copy the original
   for a backup? Or save it as “Php2.php”? Either remove Php2.php or rename it to
   something like “Php2.php.backup” while ensuring the updated code is in the “Php.
   php” file.
 *  Thread Starter Anonymous User
 * (@anonymized-14169293)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17843693)
 * Hi [@dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * After a couple of days of using your modified file, I think is safe to say that
   the issue is solved, I have no errors in the server logs.
 * I hope this fix can be included in the next release.
 *  Plugin Support [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * (@dizzyatinnocraft)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17845756)
 * @qrokes this issue is in the core product, so a proper fix will have to be done
   by the team that manages that. But in the meantime, we will patch Matomo for 
   WordPress until that fix is created and released so the problem should not reoccur.

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

The topic ‘PHP Errors in server log’ is closed to new replies.

 * ![](https://ps.w.org/matomo/assets/icon-256x256.png?rev=3531741)
 * [Matomo Analytics - Powerful, Privacy-First Insights for WordPress](https://wordpress.org/plugins/matomo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/matomo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/matomo/)
 * [Active Topics](https://wordpress.org/support/plugin/matomo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/matomo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/matomo/reviews/)

 * 14 replies
 * 2 participants
 * Last reply from: [dizzyatinnocraft](https://wordpress.org/support/users/dizzyatinnocraft/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/php-errors-in-server-log/#post-17845756)
 * Status: resolved