How to get debug output to work?

Hi.

I’m running the Kanboard docker image.
I’m trying to get debug output for a plugin I am trying to write, but I get no output.
I think I am doing this as I should, so idk what is wrong.

docker-compose.yml:

version: ‘2’
services:
kanboard:
image: kanboard/kanboard:latest
expose:
- 80
volumes:
- kanboard_data:/var/www/app/data
- kanboard_plugins:/var/www/app/plugins
- kanboard_ssl:/etc/nginx/ssl

nginx:
image: ‘skunkiferous/staticsite:1.1’
ports:
- ‘80:80’
- ‘443:443’
depends_on:
- kanboard
volumes:
kanboard_data:
driver: local
kanboard_plugins:
driver: local
kanboard_ssl:
driver: local

So, checking the data volume:

docker run --rm -i -v=kanboard_kanboard_data:/tmp/myvolume busybox cat /tmp/myvolume/config.php

define(‘DEBUG’, true);
define(‘LOG_DRIVER’, ‘file’); // Other drivers are: syslog, stdout, stderr, system or file
define(‘LOG_FILE’, ‘/var/www/app/data/debug.log’);

docker run --rm -i -v=kanboard_kanboard_data:/tmp/myvolume busybox ls -l /tmp/myvolume

total 536
-rw-r–r-- 1 100 101 152 Jun 10 11:04 config.php
-rw-r–r-- 1 100 101 540672 Jun 10 11:45 db.sqlite

docker run --rm -i -v=kanboard_kanboard_data:/tmp/myvolume busybox find /tmp/myvolume

/tmp/myvolume
/tmp/myvolume/db.sqlite
/tmp/myvolume/config.php

I tried refreshing, deleting tasks, moving tasks. Nothing; no debug.log. Am I looking in the wrong place?

I know Kanboard is reading the config.php, because I see it’s content at the top of every browser window.

What am I doing wrong?

I use the docker image as well, and do nothing special, all the errors show up in my stderr logs

So, I’ve changed config.php to only contain:

define(‘DEBUG’, true);

But, “docker logs” still shows nothing. Refreshing the page, creating an issue, deleting the issue, nothing. No output. The only thing I see, is my new config.php content at the top of every page. Docker logs from the nginx website, which proxies all requests, works just fine.

Hmmmm, I don’t even have DEBUG ‘true’…completely remove config.php and just using defaults, I still get logs.

See. I should probably do something about that missing automatic action…

docker logs <Container> on host server gives me the same log info

oh, my log driver is set to system…Think that’s default though.

Aha! It seems for the config.php to work, you have to add the arcane PHP preparatory incantation on the first line: “<?php”

Did I mention I’m a PHP noob? :smiley:

I think one could add a “reminder” about that in the “Docs » Administrator’s Guide » Configuration File” section…