Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DokuWiki crashes on FreeBSD 10 server with Apache and PHP 5.6 #5

Open
eSilverStrike opened this issue Jan 27, 2017 · 1 comment
Open
Labels
Milestone

Comments

@eSilverStrike
Copy link
Member

eSilverStrike commented Jan 27, 2017

The geeklog.net server was upgraded which resulted in geeklog.net to crash and errors like this in the server logs:

example.com [Fri Jan 27 06:28:39 2017] [notice] [pid 874]
mpm_unix.c(436): [client AH00052: child pid 61647 exit signal
Segmentation fault (11)

No php errors was recorded. Apache and php actually crashed. This does not happen on other apache and iis servers.

After a long search it looks like the error results when DokuWiki attempts to authenticate the Geeklog user.

In public_html\dokuwiki\inc\auth.php

Function auth_isMember at line 585

$user = $auth->cleanUser($user);

cleanUser is called which eventually calls function cleanID

In public_html\dokuwiki\inc\pageutils.php

which itself on line 128 calls

$id = utf8_strtolower($id);

Here is the problem. Function utf8_strtolower attempts to see if the "Normalizer" class exists and then run the normalize function. Disabling this call so it will use mb_strtolower, as seen below of seeing if the class exists seems to fix this issue.

    function utf8_strtolower($string){
        if(UTF8_MBSTRING) {
            //if (class_exists("Normalizer", $autoload = false)) 
            if (false) 
                return normalizer::normalize(mb_strtolower($string,'utf-8'));
            else
                return (mb_strtolower($string,'utf-8'));
        }
        global $UTF8_UPPER_TO_LOWER;
        return strtr($string,$UTF8_UPPER_TO_LOWER);
    }

What is the actual fix here?

@eSilverStrike eSilverStrike added this to the 1.9.0 milestone Jan 27, 2017
eSilverStrike added a commit that referenced this issue Jan 27, 2017
Temp fix for #5 which deals with apache and php crashing for some reason
(only happens on geeklog.net)
@eSilverStrike eSilverStrike modified the milestones: 1.9.1, 1.9.0 Jan 27, 2017
@mystralkk
Copy link
Member

This error seems to occur when Normalizer class exists and Intl library which the class depends on is not proper configured. You can't expect all users to correctly set up Intl library, especially on shared servers. So, your fix is best for the moment.

@eSilverStrike eSilverStrike changed the title DokuWiki crashes on Geeklog.net DokuWiki crashes on FreeBSD 10 server with Apache and PHP 5.6 Jan 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants