mariodian/Geary

Issues with nginx / php-fpm

Closed this issue · 2 comments

getallheaders() is not available on nginx. Fixed that with:

        if (!function_exists('getallheaders')) {
            function getallheaders()
            {
                $headers = [];
                foreach ($_SERVER as $name => $value) {
                    if (substr($name, 0, 5) == 'HTTP_') {
                        $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
                    }
                }
                return $headers;
            }
        }

Undefined index: REDIRECT_URL in Geary.php on line 110

This is also only set by Apache. REQUEST_URI would be better

Hey Fossil do you mind creating a PR with the code change? I'd merge it in. Thanks!

My PR #8 fixed this so it can be closed.