PHP 5 is obsolete since almost 5 years now, so OP is really late with their updates. And now they go for PHP 7, which is also at End of Life, instead of the current version 8? Oh, my!
In any case, better sure that you also update all other softwares, including DokuWiki and all plugins and templates, etc. ar also up-to-date, before even trying to run this.