A Still Unsolved Internal Server Error - Add-On Domain Installation?

Might it be that Matomo does not know how to handle Add-On Domains?

The Internal Sever Error that is created when a user checks or unchecks the opt-in/opt-out checkbox for accepting tracking cookies has not gone away – this despite my best effort to correct the problem.
After changing the value of the log[] array from screen to file in the global.ini.php file I ran the troubled checkbox. I then went to the tmp folder to look for the piwik.log file. Nothing. So, I created my own piwik.log file, ran the troubled checkbox and looked again. Although the file was still there; it was empty.

The server error is consistently the same: [Sun Apr 15 12:33:20.367548 2018] [:error] [pid 4106] (12)Cannot allocate memory: [client …] couldn’t create child process: /usr/sbin/suphp for … /matomo/index.php, referer: Grammar Captive Overview

Please keep in mind that when the page is refreshed the checkbox is as it should be. In other words the toggle appears eventually to work.

I have two more possible, but untested solutions: one is somewhat drastic, the other is an unwanted, time-consuming bother.

  1. Is it possible that Matomo does not work properly when it tries to communicate with sister add-on domains? I have a site called thegenaproject.com. The installed Matomo package resides in an add-on domains called nudge.online and the troubled checkbox in a different add-on domain called grammarcaptive.com. Would it make a difference, if I were to reinstall the Matomo package inside thegenaproject.com domain – the principal domain?

  2. Although located on the same page the checkbox is copied into the <main> div of the same page via Javascript. As a result there are two copies of the enclosing <iframe> on the same page when the checkbox is checked. Would finding another place for the checkbox that would result in only one copy of the <iframe> make a difference?

Please advise and please provide your reasoning in both instances, if not another.

Roddy

Hi,

Now that I looked at the error message again, I am not so sure if the error has something to do with Matomo, but rather if there is a bug/ configuration issue with your PHP executable?

Are you using a supported, stable PHP version?

There are a lot of people having the same issue regarding on what kind of PHP code they want to execute:

I had to google what an add-on domain is :smiley:

But no, Matomo has no problems with that. I’m tracking with one of my Matomo instances (https://stats.promato.de) many different other domains.

Yes, I understand that Matomo can track many domains, but does it know how to handle properly siblings unto the same parent? It is a question not merely of domain, but also of folder structure in the same host server account. In my case,

Parent: https://thegenaproject.com/

Children

  1. nudge.online/ (Matomo location)
  2. grammarcaptive.com/ (opt-in/opt-out button location)

Roddy

Thank you for your inspiration. Where before I was running PHP56 in the nudge.online domain and PHP7 in the grammarcaptive.com domain, I am now running PHP7 in both domains. This appears to have resolved the worst of the problem: the internal server error has disappeared, and one no longer has to refresh the page to see the change when one checks the opt-in/opt-out checkbox.

What does still appear, however, is a blank page while PHP is processing. The appearance is brief, and one does return to the same page with the iframe and checkbox in place and both reflecting the desired change. Still, the blank page is surely not what Matomo has intended.

In any case, significant progress has been made.

Roddy