matomo-org / tracker-proxy

HTTP proxy for Matomo's tracker API. This script allows to track websites with Matomo without revealing to your visitors the secret Matomo server URL.
http://matomo.org/faq/how-to/faq_132/
GNU General Public License v3.0
151 stars 46 forks source link

PHP8.1 compatibility improvement #67

Closed Madriix closed 2 years ago

Madriix commented 2 years ago

Does anyone know how to fix this to work on php 8.1?

[02-May-2022 09:34:38 UTC] PHP Deprecated:  parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /home/xxx/public_html/proxy.php on line 157
[02-May-2022 09:34:38 UTC] PHP Deprecated:  str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/xxx/public_html/proxy.php on line 160
[02-May-2022 09:34:38 UTC] PHP Deprecated:  str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/xxx/public_html/proxy.php on line 161
sgiehl commented 2 years ago

@Madriix did you create a config containing e.g. $MATOMO_URL as described in the readme here: https://github.com/matomo-org/tracker-proxy#manual-download-of-matomophp

Madriix commented 2 years ago

I just put the config.php and indeed it works fine. Before I only put proxy.php by having edited it. Thank