500 Internal Errors


#1

We’ve recently been getting a lot of 500 Internal Errors. We really thought it was a programming error or something but speaking to my hosting company, it seems that Piwik is causing some visitors to receive a 500 Internal Error.

On the error_log file under the piwik subdomain we get this error about once a minute:
PHP Warning: Module ‘pcntl’ already loaded in Unknown on line 0

but sometimes in the same file it also says:
Error in Piwik (tracker): The Piwik URL https://analytics.****.com/index.php does not seem to be pointing to a Piwik server. Response was ‘’.

I’m having a pretty hard time figuring out what the issue is.
I had an htaccess file setup to disallow visitors from the Piwik login page. Could that possibly be what’s causing this.
The .htaccess file is:
<Files “*”>
order deny,allow
deny from all
allow from MY IP
allow from MY IP

<Files ~ “^piwik.(js|php)|robots.txt$”>
Allow from all
Satisfy any

Any idea what could be causing this?

Thank you in advance for your help.


(Matthieu Aubry) #2

Hi there,

  1. Upgrade to latest Piwik version

  2. if you still have issues, check your server error logs

  3. I expect there is some kind of problem with your server configuration


#3

Thanks for the help Matt.

Piwik is the latest version.

Apache isn’t throwing any errors. Where else would I check for the errors?

I’ve contacted the hosting company and they’re saying that it’s definitely a Piwik problem (it could be my set up of it).
The access logs show:

GET /piwik.php?action_name=500%20Internal%20Error%20-%20(MORE CODE)…


#4

Guys these 500 Internal errors are continuing, I’m just about to give up on Piwik after using it for about 3 years. I would really hate to do that but it’s making our site unusable for some visitors.

Nothing is showing up with the Apache error_log file.
The only thing visible is on the access_log file and it shows the 500 Internal errors Piwik is throwing. Here’s another one today:

GET /piwik.php?action_name=500%20Internal%20Error%20-%DOMAIN%DOMAIN&idsite=1&rec=1&r=055105&h=12&m=24&s=5&url=https%3A%2F%2Fwww.DOMAIN.com%URL$s=2874 HTTP/1.1" 204 -


#5

Another one:
GET /piwik.php?action_name=500%20Internal%20Error%20-%DOMAIN%DOMAIN&idsite=1&rec=1&r=776316&h=9&m=38&s=5&url=https%3A%2F%2Fwww.DOMAIN.com%$1&java=0&gears=0&ag=0&cookie=1&res=1440x900&gt_ms=1230 HTTP/1.1" 204 -


#6

Matt,

Could this possibly be because we have “ecommerce” set to enabled with Piwik and we’re using a custom ecommerce platform?

I’ve noticed that the 500 Internal Errors mainly start when visitors register or add items to their cart and the cart functionality starts on our site. After that it’s pretty much 500 Internal Errors the rest of the way for visitors.

I’ve currently disabled “ecommerce” on Piwik and evaluating the results.


(Matthieu Aubry) #7

Hi there
if your server / Piwik creates 500 errors, then for sure you should get errors in your server error log. if you don’t it’s a server configuration issue, you need to fix it before we can help, because to help you we need this error log message?


#8

We had display_errors Off in php.ini. I’ve set that to ON.

So you don’t think having ecommerce set to On in Piwik without an ecommerce plugin could have been causing the issue?


#9

The ecommerce setting didn’t work. Still getting a ton of 500 Internal errors. Speaking to my hosting company, they’ve found the following errors:

[Sat Apr 25 15:54:52 2015] [error] [client VISITOR IP] client denied by server configuration: /PIWIK Directory/500.shtml, referer: https://www.MYDOMAIN.com/login

Numerous errors like this with just the referrer being different parts of our site.


(Matthieu Aubry) #10

Not sure what is the problem but this error is the same as this faq: How do I configure my server to let Piwik serve HTML files? - Analytics Platform - Matomo


(Massive LAB) #11

Thank you, i solved similar issue. :slight_smile: