Installing DokuWiki in CentOS 7
Once again CentOS bit me.
At work we host DokuWiki on a CentOS 7 container. I wanted to update DokuWiki to the latest stable version. The online instructions are straightforward. Use the
DokuWiki Upgrade Plugin or unpack the tar gzip file and copy the files over the current installation.
I had the plugin installed. The plugin warned me I needed to update all extensions. Then the plugin warned me that PHP 5.6 or newer is required. Of course, the change log informed me of that too.
Except I already had PHP 7.1 installed.
CentOS 7 will forever be on PHP 5.4. The latest version of DokuWiki requires PHP 5.6 or newer. Installing a newer version of PHP requires enabling the Software Collections (SCL) Repository. I had done that when I first installed DokuWiki some months ago.
I seemed to be missing the
After following some online snippets I finally was able to use the plugin to update DokuWiki. The steps, including the original steps to install PHP 7.1, look something like this:
yum install centos-release-scl yum install rh-php71 rh-php71-php-fpm php-gd scl enable rh-php71 bash systemctl enable rh-php71-php-fpm.service systemctl start rh-php71-php-fpm.service systemctl restart httpd
Except on CentOS 7, all I got was a blank page when I accessed DokuWiki.
More digging revealed I needed to modify
grep ^listen /etc/opt/rh/rh-php71/php-fpm.d/www.conf listen = 127.0.0.1:9000 listen.allowed_clients = 127.0.0.1
# SetHandler application/x-httpd-php SetHandler "proxy:fcgi://127.0.0.1:9000" systemctl restart httpd.service
Finally I could access the DokuWiki login page.
Except a lot of existing PHP scripts on the server stopped working.
Unknown when I performed the updates is apparently that breaks anything dependent upon an older PHP.
The root cause of the problem is changing the php.conf
SetHandler directive. Restoring to the previous configuration restored the PHP scripts but broke DokuWiki, which opens to a blank page, which blocks users from getting into the wiki.
One way or another something breaks.
To resolve the problems I restored DokuWiki to the previous version and restored the previous
Perhaps I missed an important step somewhere. Perhaps I should have installed PHP 5.6. Perhaps the problem is the
listen.allowed_clients directive, but I am not a PHP guru. All I know is breakage like this occurs more often with CentOS systems.
Doesn’t really matter. I wasn’t going to waste time on this. I have had enough of CentOS.
Perhaps this tomfoolery is for the best. As we are using Ubuntu MATE with our migration at work, we will be using Ubuntu Server when we build a new office server. We will be moving the wiki off the CentOS server to the new office server. For the short term I will create an Ubuntu server container to host DokuWiki, which will avoid the CentOS issues and provide a nice burn-in test with Ubuntu.
When ready to go live with the new container server I’ll ensure all browser bookmarks and links are updated on all servers and workstations.
I updated DokuWiki on my own Slackware system and had no problems. To use that favorite phrase, “everything just works.”