The Missing piwik.log File

(Roddy A. Stegemann) #1

I am still (see Cookie Opt-In, Opt_Out Checkbox Dysfunctional) trying to discover the source of an internal server error created when users check or uncheck the opt-in/opt-out toggle for the acceptance or rejection of an individual tracking cookie.

In my quest for the source of this error I have stumbled across the following passage in the global-ini.php file in the config folder.

When I look for the piwik.log file in the /matomo/tmp/logs/ folder, as instructed, I discover something very different – namely, two files called index.htm and index.php.

  1. Is this because the log_writers[] array is set to screen, rather than file?
; possible values for log: screen, database, file
log_writers[] = screen

; log level, everything logged w/ this level or one of greater severity
; will be logged. everything else will be ignored. possible values are:
log_level = WARN | INFO | DEBUG
; if configured to log in a file, log entries will be made to this file
logger_file_path = tmp/logs/piwik.log

In the end my goal is to discover what is causing the internal server error and am hoping that PHP error messages could offer a clue.

  1. Where or how do I find these ?

  2. Finally, can one select multiple error options? If so, how does one delimit them? With a pipe, a comma, or merely a space? If not, are they increasingly inclusive moving from left to right?


(Lukas Winkler) #2


Yes, you need to set it to file, to save the logfile to matomo.

Indeed I am pretty sure that DEBUG includes all other log levels and so on.

That’s just in case you have a misconfigured server which lists the folder contents, one can’t find the logfile.

(Roddy A. Stegemann) #3

OK. So, once I set log_writers[] to file, how do I view the file, if piwik.log is invisible.

(Lukas Winkler) #4

I am not sure what you mean with “invisible”.
Make sure your webserver’s user has write access and you have read access to the file.

(Roddy A. Stegemann) #5

You wrote:

How was I to interpret this?


(Fabian Dellwing) #6

He means, that someone trying to get information about your server cannot open the file in his webbrowser. But you can simply open it on your shell or download it via ftp.

(Roddy A. Stegemann) #7

Thank you, Fabian. Unfortunately, setting the value from screen to file has made no difference. The error message is the same, but there is no record of an error in a file callled piwik.log. You may try it yourself.

Step 1: Grammar Captive Overview
Step 2: After clearing the two splash panels look for the subheading Legal/Privacy under the Other option in the navigation bar (see left). Click.
Step 3: Scroll down to the section entitled Data Collection and Analysis and look for the Matomo opt-in/opt-out toggle checkbox. Click
Step4: Wait. The internal server error will appear.
Step5: Refresh the page, and observe that the status of the checkbox has changed.

In effect, the button works, but not without the appearance of an internal server error. No piwik.log file is generated.

Where to I find associated associated PHP errors?

How would you explain this phenomenon?


p.s. This is the cause of the Internal Service Error generated by the server. I have replaced a portion of the file path with pathto and left out my IP address. The referrer page is the page on which the opt-in/opt-out toggle checkbox is located (see Steps 1, 2, and 3 above).

Cannot allocate memory: [client …] couldn’t create child process: /usr/sbin/suphp for pathto/matomo/index.php, referer: Grammar Captive Overview