Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


[Solved] IIS Internal Server Error 500 When Accessing Your DokuWiki

This may be a permissions error in writing to php_error.log.

After upgrading an IIS webserver's PHP version, let's say you upgraded from PHP version 7.2.19 to PHP version 8.1.8, you may have found that some or many of your websites or certain web functions (bulletin board forums and/or phpmyadmin) were not compatible with the upgraded PHP version. So, to troubleshoot, you probably tried to access your php_errors.log with Notepad++ editor to determine the problem. However, if your php_errors.log contains too many entries and your editor is “not responding” to open the php_errors.log, then you may have decided to delete this bloated and cumbersome php_errors.log file and create a new php_errors.log file with no data. At that point, you may have noticed that your DokuWiki is no longer accessible from the web. Instead you are seeing “Error 500 - Internal Server Error.” Now, at this point, you may have reinstalled the older working version of PHP 7.2.19 from your complete file backup (because, with best practices, we always first make a complete backup of the working PHP version before upgrading to or installing a newer PHP version).

Here is a possible solution to the 500 Error. When you created the new php_errors.log file, you may have failed to give “Modify” and “Write” permissions to the IUSR user account and IIS_IUSR group account.

Find the file system location of your php_errors.log based on the setting in your php.ini configuration file. On Windows O/S, the php.ini file is usually located at c:\php\php.ini

The php_errors.log is usually located somewhere like c:\php\logs\php_errors.log

Right click the php_errors.log file and select “properties” from the drop down list.

Select the “Security” tab.

See if the “IUSR” Username account and/or the “IIS_IUSRS (YourServerName\IUSRS)” Group has/have “Modify” and “Write” permissions, in addition to “Read & Execute” and “Read” permissions.

You may need to add the “IUSR” username account and “IIS_IUSRS” group account to the permissions list or the “php_errors.log” file, and give each of those accounts modify and write permissions to the “php_errors.log” file. To do so, click in sequence the “Edit” button and the “Add” button and the “Advanced” button and the “Find Now” button and, holding down the CTRL key on your keyboard, select both the “IUSR” account name and “IIS_IUSRS” group name (and then click OK after selecting both or each) and select the IUSR account and, under the “Allow” column, check the “Modify” permissions checkbox which will grant both “Modify” and “Write” permissions to the IUSR account, and likewise, select the IIS_ISRS group and under the “Allow” column check the “Modify” checkbox next to the IIS_IUSRS group which will add both Modify and Write permissions to the IIS_IUSRS group.

Conclude with Ok to accept your changes.

Now, try to access your DokuWiki from the web. Hopefully, the 500 error is gone and your DokuWiki is publishing.

Next, use a good text editor, like Notepad++ to open / edit your php_errors.log file and see which error or warning is now being written to the log file (previously having been blocked due to lack of write permissions.) If there is a compatibility problem with a plugin, then update the offending Plug-in using Extension Manager in the Admin area of your DokuWiki. See this article by Andreas Gohr:

solved_iis_internal_server_error_500_accessing_dokuwiki.txt · Last modified: 2022/07/15 14:46 by wikiadmin