Hallo
I have Windows 10 with installed Apache 2.4 and PHP 8.0,0 as module (not cgi).
When I first launch dokuwiki I got these errors on the page (and in my php_errors.log):
[15-Jan-2021 15:32:19 Europe/Berlin] PHP Warning: Undefined array key "fperm" in C:\Apache24\htdocs\dokuwiki\inc\init.php on line 343
[15-Jan-2021 15:32:19 Europe/Berlin] PHP Warning: Undefined array key "fperm" in C:\Apache24\htdocs\dokuwiki\inc\io.php on line 255
[15-Jan-2021 15:32:19 Europe/Berlin] PHP Warning: Undefined array key "fperm" in C:\Apache24\htdocs\dokuwiki\inc\io.php on line 255
[15-Jan-2021 15:32:19 Europe/Berlin] PHP Warning: Undefined array key "fperm" in C:\Apache24\htdocs\dokuwiki\inc\io.php on line 255
So this is what I do:
Now I reload the page and the errors has gone.
But when I edit the page the error is back, only one error of that kind, and gone agian, when I reload.
So each time I load a new page I see the error about this undefinded config[fperm] and when I reload that very page the error doesn't show (but shows again, on next launch).
When I comment out the line 255 of io.php as such:
// if(!$fileexists and $conf['fperm']) chmod($file, $conf['fperm']);
the error is not throwing, but I guess this is not the right solution ;)
I asked already in the forum: DokuWiki on Windows without WAMP etc.
Thanks.
frank
php 8 won't work for dokuwiki as is noted in the requirements: https://www.dokuwiki.org/requirements
Do you think the errors are related to the PHP version?
Then I would change to 7.4 and retry, but I doubt it is about PHP version :(
This is definitely a PHP 8 issue, and not just under Windows - I'm getting the same error on my Ubuntu dev box.
The installer displays this message on top of page
Warning: Undefined array key "fperm" in /tmp/dokuwiki/inc/io.php on line 255
This issue should be tagged _PHP 8_
Could changes in last release influence this as well?
https://github.com/splitbrain/dokuwiki/pull/2985/files
@Klap-in I think you're right. That change assumes that $conf['fperm'] exists, but it might not:
We unset it first and then only set it when the umask disagrees with what is configured.
I guess the proper fix is to initialize it as false or null instead of unsetting it.
I reached the same conclusion, will provide PR.