Server Error 500 matomo.php &rec=1

Hello everyone,

Since a few month we are receiving ServerError 500 when using the following URL:

https://piwik.re-in.de/matomo.php?action_name=voelkner%20-%20direkt%20günstiger%20|%20Elektronik%2C%20Technik%2C%20Werkzeug%20%26%20mehr&idsite=1&rec=1&r=858341&h=9&m=17&s=58&url=https%3A%2F%2Fwww.voelkner.de%2Fmy%2Forders_details.html%3Foid%3D159189407%26page%3D1&urlref=https%3A%2F%2Fwww.voelkner.de%2Fmy%2Forders.html&uid=135003855&_id=0e560923070c321a&_idts=1587712534&_idvc=1&_idn=0&_refts=0&_viewts=1587712534&send_image=1&pdf=0&qt=0&realp=0&wma=0&dir=0&fla=0&java=0&gears=0&ag=0&cookie=1&res=1920x1080&_cvar={"1"%3A["B2"%2C"3"]%2C"2"%3A["0"%2C"1"]%2C"3"%3A["WKDB"%2C"0"]%2C"4"%3A["usr"%2C"QYSVVYCSS"]%2C"5"%3A["1"%2C"0"]}&gt_ms=680&pv_id=2dAjC3

I could figure out the problem is the parameter “rec=1”. I also figured out that this has something to do with the pixel-Tracking, as well as that this error is related with ssl encryption. Therefore I inserted “assume_secure_protocol = 1” into the config.ini.php. I thought, I solved the problem, but last week, a colleague of mine told me that this error occurs again.
At this time I have no glue anymore what else could help. So I am asking you experts to help me please.

By the way, this error does not occur in all browsers. Only chrome on Mac, Edge or InternetExplorer.
I, for myself use firefox and chrome on Linux and Windows without any Problems except of the Edge-Browser.
I also testet it on vivaldi and opera without an error.

Regards, Marcel

Hi,

Without it Matomo doesn’t handle the data at all, so there can’t go anything wrong.

Can you check your PHP error log for more information?
Maybe also try out Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3 to see more precisely what goes wrong with this request.

Dear Lukas.

Thanks for your fast reply. I made a debug session and I could track the following errros down:

#0 /var/www/html/plugins/IP2Location/lib/IP2Location.php(1617): IP2Location\Database::ipVersionAndNumber('2a01:c22:7640:5...')
#1 /var/www/html/plugins/IP2Location/LocationProvider/IP2Location.php(92): IP2Location\Database->lookup('2a01:c22:7640:5...', 1001)
#2 /var/www/html/plugins/UserCountry/VisitorGeolocator.php(145): Piwik\Plugins\IP2Location\LocationProvider\IP2Location->getLocation(Array)
#3 /var/www/html/plugins/UserCountry/VisitorGeolocator.php(115): Piwik\Plugins\UserCountry\VisitorGeolocator->getLocationObject(Object(Piwik\Plugins\IP2Location\LocationProvider\IP2Location), Array)
#4 /var/www/html/plugins/UserCountry/Columns/Base.php(55): Piwik\Plugins\UserCountry\VisitorGeolocator->getLocation(Array, true)
#5 /var/www/html/plugins/UserCountry/Columns/City.php(43): Piwik\Plugins\UserCountry\Columns\Base->getLocationDetail(Array, 'city_name')
#6 /var/www/html/core/Tracker/Visit.php(482): Piwik\Plugins\UserCountry\Columns\City->onNewVisit(Object(Piwik\Tracker\Request), Object(Piwik\Tracker\Visitor), Object(Piwik\Tracker\ActionPageview))
#7 /var/www/html/core/Tracker/Visit.php(288): Piwik\Tracker\Visit->triggerHookOnDimensions(Array, 'onNewVisit')
#8 /var/www/html/core/Tracker/Visit.php(203): Piwik\Tracker\Visit->handleNewVisit(NULL)
#9 /var/www/html/core/Tracker.php(155): Piwik\Tracker\Visit->handle()
#10 /var/www/html/core/Tracker/Handler.php(57): Piwik\Tracker->trackRequest(Object(Piwik\Tracker\Request))
#11 /var/www/html/core/Tracker.php(135): Piwik\Tracker\Handler->process(Object(Piwik\Tracker), Object(Piwik\Tracker\RequestSet))
#12 /var/www/html/core/Tracker.php(112): Piwik\Tracker->track(Object(Piwik\Tracker\Handler), Object(Piwik\Tracker\RequestSet))
#13 /var/www/html/piwik.php(76): Piwik\Tracker->main(Object(Piwik\Tracker\Handler), Object(Piwik\Tracker\RequestSet))
#14 {main}

after this I changed the geolocation method to default and made the same request without any errors. Then I switched back to IP2Location and the error was gone. But this was only on our test system.
Could you explain this behaviour?
Or should I write a message to the developers of IP2Location?

Thanks in advance,

Marcel

Hi,

Great that it is working now. Honestly I don’t have an explanation. The error message, that would be important to find out what went wrong, is just the line above #0.
Maybe forwarding details to the developer helps, I don’t see any open issue in their repo:

Hi Lukas,

I sincerely appreciate all your help.

I also opened an issue on GitHub for ip2location.

In case there is any solution available, I will post it here too.

Regards,

Marcel

Hi,

As I just saw the error message on your screenshot (call to undefined function … bcadd), I found an existing issue about this:

You need to have the bcmath php module enabled.

Hi Lukas,

as stated before, I really appreciate your time.
Your hint was the missing link to the solution.

Regards, Marcel