KREST - KReportor (SuiteCRM)/SpiceCRM - blank screen on test


#1

This affects both SpiceCRM and Kreporter in SuiteCRM.

When using a supported PHP (7.0) and apache2 + php-fpm (at least here on Debian Stretch) getallheaders() is not available as such KREST fails to work (blank screen).

To fix, somewhere in KREST/index.php (before Slim) add in this:

    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;
    }
}

#2

related thread Issues with New Installation