Closed apollo13 closed 3 years ago
I managed to fix this in a custom docker image by adding /var/www/fixes.php
with this content:
<?php
if(!defined('DOKU_INC')) define('DOKU_INC', '/var/www/');
and adding a 02-fixes.sh
for cont-init.d doing the following:
#!/usr/bin/with-contenv sh
# PHP
echo "Setting PHP INI configuration..."
sed -i "s|auto_prepend_file.*|auto_prepend_file = /var/www/fixes.php|g" /etc/php7/php.ini
This way the fixes.php
is loaded for every request and DOKU_INC
will always be defined. This way plugins do not have to guess where it is.
@crazy-max Any chance you can validate if this is something you could include? I'm seeing error messages about DOKU_INC
as well
@apollo13 @wgordon17 Very sorry for the delay, can you test with crazymax/dokuwiki:edge
? Thanks!
@crazy-max That unfortunately hasn't fixed the issue for me. My issue seems specific to the Dokuwiki Bootstrap3 template.
I am currently using this as a workaround: https://github.com/giterlizzi/dokuwiki-template-bootstrap3/blob/master/css.php#L18-L22
But I'm thinking I might actually just be better served by submitting a PR to the Bootstrap3 template for this specific path, similar to how they've done it for other Docker images: https://github.com/giterlizzi/dokuwiki-template-bootstrap3/blob/master/css.php#L27-L30
@wgordon17 Thanks for your feedback. Yeah it looks like the fix of @apollo13 is the best in this kind of situation. I will make the necessary changes.
Ok should be fixed now.
@crazy-max While testing for #25 I think you broken the edge repo with the latest commit in here:
2021/02/20 10:34:48 [error] 529#529: *1 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0PHP message: PHP Fatal error: Unknown: Failed opening required '/var/www/preload.php' (include_path='.:/usr/share/php7') in Unknown on line 0" while reading response header from upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm7.sock:", host: "localhost:8000"
preload.php
is in /var/www/inc
in my container at least.
@apollo13 Sorry my bad.. I've triggered a new release to fix that: https://github.com/crazy-max/docker-dokuwiki/runs/1941489326?check_suite_focus=true
Works great now, thanks!
Behaviour
Steps to reproduce this issue
Expected behaviour
The ui should update nicely and reindex all pages
Actual behaviour
Hangs at "Searching pages" and the developer console shows a 500 error. Errorlogs show:
The reason for this is that searchindex (and maybe other plugins) construct
DOKU_INC
like this: https://github.com/splitbrain/dokuwiki-plugin-searchindex/blob/32e56a59996ea3a10b3a70f0239fc13d58f1174b/ajax.php#L16This breaks down when the plugins are symlinked into the data directory. Any ideas on how to improve this?