Dokuwiki errors log?

NethServer Version: 7.6
Module: dokuwiki

I’ve had the Dokuwiki module installed for a while, and it’s working well to host a beginner’s guide to FreeNAS. I just had a request for a way to download the entire guide as a PDF, which seems like a good idea. It seems like the dw2pdf plugin is able to handle this, so I installed it, and it’s working great to PDF a single page. But when I try to do the entire guide, it takes me (after a bit of delay) to a blank page.

Since the guide contains a lot of images, I’m guessing I’m running into a memory limit problem, but I can’t find any relevant logs–I’d expect to see PHP errors logged somewhere in /var/log/httpd, but nothing is showing up there, nor in /var/log/messages. Where should I be looking for these? @stephdl?

1 Like

It should be on httpd log error, maybe messages, try to increase the memory, it is set to 128mB by default, you need also to increase the time allowed to a task

Strange… I think you’re already looking at the right place (/var/log/httpd/ssl_error_log)
Also you might want to check this:

This uses the default PHP installation, right? Because it’s already set to 512 MB:

[root@neth ~]# config show php

…and even with setting MaxInputTime and MaxExecutionTime as above (they were set to 60 and 0, respectively), I still get the blank page. If I set both to 0, same thing. If I set both to 0 and set MemoryLimit to 1024, still the same thing. And there’s nothing at all in ssl_error_log.

Need to check, a bit late in the paris TZ but dokuwiki use the nethserver-php71-fpm so the values are not those of default php settings,

Are there properties to configure php71-fpm, or is it just a matter of manually editing the config file?

Yep dokuwiki gets some basic php settings, the wiki gives some informations[]=dokuwiki

Maybe the maxtime should be created in my template… Could you test?

Got it–there are a few settings, but not for the execution time or input time. It seems strange that the memory limit and the upload filesize are linked, though–it seems they should be separate.

I can play with it a bit, hopefully this weekend.

In short the max memory must be equal or superior of the postmaxsize, since it is a template( without logic) it is a simple way to get good values. In a panel you could implement validator to avoid this

please update to nethserver-dokuwiki-1.2.7-1.ns7.sdl.noarch.rpm and check the wiki

I implemented a MaxExecutionTime(60s) and MaxInputTime (2*MaxExecutionTime)

OK, I’ve updated nethserver-dokuwiki, and I see the new settings, but they don’t seem to be taking effect. Here are the current settings:

[root@neth dokuwiki]# config show dokuwiki

But here’s what a phpinfo() page in /usr/share/dokuwiki is reporting:


…and yes, I’ve run signal-event nethserver-dokuwiki-update. The settings appear to be made in zzz_dokuwiki.conf:

<Directory /usr/share/dokuwiki>
    SSLRequireSSL on
    AllowOverride None
    Options +FollowSymlinks
    AddType application/x-httpd-php .php
    Require all granted
    php_admin_value memory_limit 1024M
    php_admin_value upload_max_filesize 1024M
    php_admin_value post_max_size 1024M
    php_admin_value max_execution_time 120
    php_admin_value max_input_time 240
    php_admin_value upload_tmp_dir /var/lib/dokuwiki/data/tmp
    php_admin_value session.save_path /var/lib/dokuwiki/data/tmp

Kind of scratching my head here–any further ideas?

If you restart the service of php-rh-71-fpm?

Did that as well (the service is rh-php71-php-fpm). But that’s leading me to suspect something…

zzz_dokuwiki.conf is part of the Apache configuration, and contains a number of PHP settings. That’s perfectly valid when using mod_php. But we aren’t using mod_php; we’re using php-fpm instead (which seems to be the preferred way of using PHP, and would be needed in any event to support the software collections AIUI). And I’m not seeing any examples/documentation/guides suggesting we can change PHP settings for php-fpm using the Apache configuration files. What I’m finding (this, for example, edit: and more directly this) indicates that we’d need to set up a separate php-fpm pool with the desired configuration, and then have the dokuwiki config specify the use of that pool.


…and now that php-fpm has got the wheels turning in my mind, I’ve found its config file (/etc/opt/rh/rh-php71/php-fpm.d/www.conf), which points to the error log file (/var/opt/rh/rh-php71/log/php-fpm/www-error.log), which confirms that the errors I’m getting are a result of hitting the 128M memory limit. I’ve edited the config file to add these lines:

php_admin_value[memory_limit] = 512M
php_admin_value[max_execution_time] = 60
php_admin_value[max_input_time] = 120

…and after reloading rh-php71-php-fpm, the phpinfo() page is now showing the expected values, and the download is working as expected too.

1 Like

Yes but it is what i am expecting, you modified the values for the whole php71, at least we know it was the root of your issue. I will look further later, not available now (with my daughter at her school)

Ok I missed to create my own instance of rh-php71-php-fpm, when I switched to php scl I have forgotten to do it, so we used the small default rh-php71 settings. This is something I did for nethserver-php-scl…

Sorry for the noise and the bug

now with nethserver-dokuwiki-1.2.8 you run a rh-php71 instance for dokuwiki.

You can find the configuration at /etc/opt/rh/rh-php71/php-fpm.d/dokuwiki.conf