The directory
inc and the file
preload.php do exist, and they are provided the needed permissions:
/var/www/dokuwiki $ ls -alF
insgesamt 112
drwxrwx--x 8 www-data www-data 4096 Mär 20 14:20 ./
drwxrwxr-x 4 www-data www-data 4096 Mär 18 2014 ../
.
.
.
drwxrwx--x 7 www-data www-data 4096 Okt 2 2014 inc/
.
.
/var/www/dokuwiki $ ls -alF inc/preload.php
-rw-rw---- 1 www-data www-data 6180 Jul 19 2011 inc/preload.php
For clarity, I left out the rest. As you can see, the file and the directory are writeable by the web server's id.
I will try out the code you provided. What exactly does it do, where in the file do I need to put it and where will it write the information needed for debugging?