During my latest attempt to upgrade dokuwiki, it broke. I had permission issues during the upgrade. While troubleshooting I lost the possibility to connect through the web-interface. Now I am trying to reinstall dokuwiki - and grateful for any help I can get.

I want to install dokuwiki in a jail in FreeNAS 11.1 U5. Apache and PHP seem to be running fine - at least, I can restart the apache service without problems.
I download the latest dokuwiki installer and proceed. The web interface tells me: "Download completed successfully. Please continue to next step."

DokuWiki archive file deleted.
DokuWiki Download Script deleted.
You're done. DokuWiki was successfully downloaded and extracted on your server. The next step is to run the default installer to do some initial setup.

Next thing I see is chrome displaying the following error message.

This page isn’t working
192.168.1.13 is currently unable to handle this request.
HTTP ERROR 500

The 'problematic' file appears to be your php executable. I've only had limited experience with freebsd, so I'm not entirely sure what is happening here with your package manager. Did you uninstall php 5.6, then install 7.2., then reinstall 5.6 on top of 7.2--because this seems to be what happened and what probably accounts for why bin/php is problematic, presumably corrupt.

All you had to do before was to install the missing packages for your version of php.

I'm afraid I can't be of any further help. First, I'm not sure why you need to set dokuwiki in a jail. 2. I don't know why the instructions suggest setting up apache for php 5.6 and then its having you install php7. Create is not a command but an instruction to you to make a file by that name and path. The contents listed go in php.conf.

You are following too many sets of instructions. Why don't you start from scratch and follow the set of instructions you found in this link:https://forum.dokuwiki.org/thread/15963.
Apparently it works and it is current.