# Issues with New Installation

**URL:** <https://community.spicecrm.io/t/issues-with-new-installation/259>\
**Category:** Installation\
**Created:** [February 27, 2018, 3:14pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259 "2018-02-27T15:14:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![orchid](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@orchid](https://community.spicecrm.io/u/orchid)\
**Post date:** [February 27, 2018, 3:14pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/1 "2018-02-27T15:14:59Z")

</div>

So I’ve been testing out spice for my company and I keep running into the same issue with the KREST API not working correctly.

When I go to /KREST/sysinfo I get a 500 error. There is no errors in any error log to point to what the potential problem could be.

And when I try to log in I get the message that “Url rewrite is not working. Please ensure you have enabled and configured url rewriting on this webserver.” I’ve checked everything that would point to URL rewriting to not be working but it’s working.

I feel like I am running in circles and the answer is obvious. Any ideas?

System Info:  
OS: Fedora 27  
PHP Version: 7.1

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [February 27, 2018, 3:37pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/2 "2018-02-27T15:37:23Z")

</div>

Orchid,

Just to make sure:  
You installed latest SpiceCRM version 2018.01.00.  
Your php.ini display\_error setting is off  
You followed instructions in [http://www.spicecrm.io/download/krest-installation-guide/](http://www.spicecrm.io/download/krest-installation-guide/)

Val

---

<div class="post-metadata">

**Author:** ![orchid](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@orchid](https://community.spicecrm.io/u/orchid)\
**Post date:** [February 27, 2018, 3:52pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/3 "2018-02-27T15:52:17Z")

</div>

Val,

Yes I have the 2018.01.00 version of Spice.  
My php.ini file has displey\_errors as Off.  
I installed KREST successfully per the installation guide (which was very helpful). I get a blank page and when I open the console I see a 500 Error on /KREST/sysinfo

Thank you!

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [March 5, 2018, 2:47pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/4 "2018-03-05T14:47:56Z")

</div>

Orchid,  
in KREST/index.php  
on line 18 there is  
ini\_set(‘error\_reporting’, ‘E\_ERROR’);  
Comment this line  
//ini\_set(‘error\_reporting’, ‘E\_ERROR’);  
Error reporting will then be set as in your php.ini. You probably shall get more entries in your php error log

Val

---

<div class="post-metadata">

**Author:** ![orchid](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@orchid](https://community.spicecrm.io/u/orchid)\
**Post date:** [March 5, 2018, 6:54pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/5 "2018-03-05T18:54:35Z")

</div>

Thank you Val.

I see the error as below

[05-Mar-2018 13:50:17 America/Indiana/Indianapolis] PHP Fatal error: Uncaught Error: Call to undefined function getallheaders() in /var/www/spicecrm/KREST/KRESTManager.php:306  
Stack trace:  
#0 /var/www/spicecrm/KREST/index.php(87): KRESTManager-\>getProxyFiles()  
#1 {main}  
thrown in /var/www/spicecrm/KREST/KRESTManager.php on line 306

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [March 6, 2018, 9:11pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/6 "2018-03-06T21:11:26Z")

</div>

Orchid,

getallheaders() is a native php function for apache.  
Is apache running under Fedora?  
Is engine=on in your php,ini?

Val

---

<div class="post-metadata">

**Author:** ![orchid](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@orchid](https://community.spicecrm.io/u/orchid)\
**Post date:** [March 8, 2018, 3:11pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/7 "2018-03-08T15:11:37Z")

</div>

I am running apache and engine is on.

I actually found the problem.

[https://bugs.php.net/bug.php?id=62596](https://bugs.php.net/bug.php?id=62596)

I’m running fedora 28 which would explain why I’m getting this issue.

---

<div class="post-metadata">

**Author:** ![orchid](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@orchid](https://community.spicecrm.io/u/orchid)\
**Post date:** [March 8, 2018, 3:18pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/8 "2018-03-08T15:18:42Z")

</div>

Val,

I just wanted to let you know that I resolved the issue by adding the follow code to /KREST/index.php

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

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [March 8, 2018, 4:54pm UTC](https://community.spicecrm.io/t/issues-with-new-installation/259/9 "2018-03-08T16:54:36Z")

</div>

Orchid,  
great job!  
Val
