I think I tracked the problem down to the wrong PHP command. We needed to call the updated Red Hat PHP located at /opt/rh/rh-php71/root/usr/bin :
# tail -n 12 /var/www/html/update-wiki.sh
# Always run update script per
https://www.mediawiki.org/wiki/Manual:Update.php /opt/rh/rh-php71/root/usr/bin/php "$WIKI_DIR/maintenance/update.php" --quick
echo "Restarting Apache service"
if ! systemctl restart httpd24-httpd.service; then
sleep 3
systemctl stop httpd24-httpd.service
systemctl start httpd24-httpd.service
fi
cd "$TOP_DIR"
But previously the script looked like this:
php "$WIKI_DIR/maintenance/update.php" --quick
It would succeed most of the time, but fail on occasion.
I think it is poor engineering on Red Hat's part. The latest Red Hat and CentOS should come with a modern PHP and Apache. People who want the ancient stuff should have to do something special. Instead, Red Hat turned it on its head and make most of the world jump through hoops hoops for PHP 7 and friends.
Jeff