I’m running the WordPress plugin connected to Matomo in Self-Hosted (PHP API) mode, WP-Matomo 1.0.23 is successfully connected to Matomo 4.2.1. You are running WordPress 5.7.2.
In my server logs, I see a lot of warnings.
type
E_NOTICE (8)
info
Undefined index: proxy_client_headers
file
/home/user/public_html/matomo/core/IP.php
line
49
It seems to coincide with doing a GET request with query parameters, e.g.
example.org/?some=argument
Everything stills seems to work though, but it would be nice if there are isset() checks to avoid the warnings filling up people’s logs?
The issue is most likely that some update didn’t update the config/global.ini.php to the latest version and now there are some options in it missing (and when Matomo tries to read those options, it fails)
looks into the [General] section of the Matomo config (first config.ini.php and then global.ini.php as a fallback) and searches for the proxy_client_headers option.
Maybe your config.ini.php isn’t a valid INI file and therefore breaks some settings.
It is hard to support installation methods created by others as they can arbitrary change Matomo code and therefore introduce their own bugs.
Thanks, I really appreciate the help. There is no proxy_client_headers in my config.ini.php, but it is in the global.ini.php, but all commented out.
What should I set it to?
; List of proxy headers for client IP addresses
; Matomo will determine the user IP by extracting the first IP address found in this proxy header.
;
; CloudFlare (CF-Connecting-IP)
;proxy_client_headers[] = HTTP_CF_CONNECTING_IP
;
; ISP proxy (Client-IP)
;proxy_client_headers[] = HTTP_CLIENT_IP
;
; de facto standard (X-Forwarded-For)
;proxy_client_headers[] = HTTP_X_FORWARDED_FOR