Closed Maffsie closed 1 month ago
Working on the same task (migrating from the bitnami image) and facing the same situation! If you disable the health check in the compose file, it works (another workaround)
Interesting. Can you try changing STDERR
to php://stderr
in /var/www/html/inc/Logger.php:231
and report if that works?
actually you probably need this:
$stderr = fopen('php://stderr', 'w');
fwrite($stderr, "\n[" . $this->facility . '] ' . implode("\n", $lines) . "\n");
fclose($stderr);
@splitbrain Will patch it and see if that works
actually you probably need this:
$stderr = fopen('php://stderr', 'w'); fwrite($stderr, "\n[" . $this->facility . '] ' . implode("\n", $lines) . "\n"); fclose($stderr);
Adding this to my Logger.php did indeed allow the shipped health.php
to work normally. It logged:
[deprecated] 2024-08-26 14:16:09 utf8_strtolower() is deprecated. It was called from auth_plugin_adfs::cleanUser() in /storage/lib/plugins/adfs/auth.php:155 dokuwiki\Utf8\PhpString::strtolower() should be used instead!
So it looks like the plugin causing this issue to appear was ADFS after all.
just to make sure it works as intended. health.php returns OK and the message above is logged to the apache log only, right?
Could you quickly check something else? Could you undo the changes and instead add the following at the top of health.php
to see if that would work:
define('STDERR', fopen('php://stderr', 'w'));
(because I could ship this kind of fix in the docker image, while the other fix would need to wait for the next dokuwiki release)
@splitbrain Checked, no dice - the "Undefined constant" errors return if I revert and do that instead.
damn. okay. thanks for checking
just to make sure it works as intended. health.php returns OK and the message above is logged to the apache log only, right?
Could you quickly check something else? Could you undo the changes and instead add the following at the top of
health.php
to see if that would work:define('STDERR', fopen('php://stderr', 'w'));
(because I could ship this kind of fix in the docker image, while the other fix would need to wait for the next dokuwiki release)
@splitbrain My mistake - I messed up something while changing the health.php file - the above does work. Sorry for the false-negative!
ohh. nice. I was racking my head here why it shouldn't work :-)
Hi!
I migrated from the bitnami/dokuwiki image after finding out that it was deprecated, unmaintained and broken (would sure be nice if bitnami said this somewhere other than on their github issue tracker..) and almost everything worked, however the healthcheck never seems to actually pass.
If I shell into the container and replace the contents of
/var/www/html/health.php
with justok
then I can stop the service from restarting, but that's obviously no fix. It looks like the inclusion ofdefine('DOKU_UNITTEST', 1);
in the includedhealth.php
causes the logger to attempt to log todokuwiki\STDERR
when it fails to load a plugin, but that constant isn't defined.Stack trace:
Interestingly, I'm unable to identify what plugin it's failing to load; no log is generated otherwise. Tried disabling every single non-bundled plugin other than the ADFS plugin, but no dice, and the ADFS plugin is demonstrably working fine.
As a work-around, I have a slightly-edited
health.php
mounted on top of the shipped file.