# seo index via cron: Fatal error: Call to a member function getHeader() in Bootstrap.php on line 83

**URL:** <https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238>\
**Category:** Allgemein\
**Created:** [4. Februar 2016 um 23:44 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238 "2016-02-04T23:44:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunsara](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sunsara](https://forum.shopware.com/u/Sunsara)\
**Post date:** [4. Februar 2016 um 23:44 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/1 "2016-02-04T23:44:34Z")

</div>

Hallo,

wenn ich den SEO Index manuell aufrufe läuft alle OK, beim Versuch dies nun per cronjob erledigen zu lassen bekomme ich folgende Fehlermeldung

**Processing Refresh seo index  
Fatal error: Call to a member function getHeader() on a non-object in /engine/Shopware/Plugins/Default/Core/System/Bootstrap.php on line 83  
PHP Fatal error: Call to a member function getHeader() on a non-object in /engine/Shopware/Plugins/Default/Core/System/Bootstrap.php on line 83**

Leider bin ich trotz Suche nicht weitergekommen. Hat jemand eine Ide?

Danke schonmal,  
Andreas  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Sunsara](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sunsara](https://forum.shopware.com/u/Sunsara)\
**Post date:** [4. Februar 2016 um 23:46 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/2 "2016-02-04T23:46:18Z")

</div>

Sorry, hat sich erledigt.

service httpd restart hat geholfen.

---

<div class="post-metadata">

**Author:** ![Sunsara](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sunsara](https://forum.shopware.com/u/Sunsara)\
**Post date:** [5. Februar 2016 um 22:19 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/3 "2016-02-05T22:19:50Z")

</div>

Hat sich leider doch nicht erledigt. Wenn der Job refresh seo index aufgerufen wird, bricht er mit o.g. Fehlermeldung ab und wird im Anschluss auf inaktiv gesetzt.

Wäre wirklich für jede Hilfe dankbar.

Andreas

---

<div class="post-metadata">

**Author:** ![Sunsara](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sunsara](https://forum.shopware.com/u/Sunsara)\
**Post date:** [6. Februar 2016 um 12:34 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/4 "2016-02-06T12:34:13Z")

</div>

heute morgen derselbe Fehler.

Ausserdem war die Tabelle s\_search\_index nicht mehr vorhanden.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Sunsara](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sunsara](https://forum.shopware.com/u/Sunsara)\
**Post date:** [7. Februar 2016 um 17:21 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/5 "2016-02-07T17:21:29Z")

</div>

heute wieder wie gestern

**PHP Fatal error: Call to a member function getHeader() on a non-object in /engine/Shopware/Plugins/Default/Core/System/Bootstrap.php on line 83**

und Tabelle s\_search\_index weg. Kein Eintrag in den Logfiles.

Bin ratlos…

---

<div class="post-metadata">

**Author:** ![Sunsara](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sunsara](https://forum.shopware.com/u/Sunsara)\
**Post date:** [8. Februar 2016 um 14:49 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/6 "2016-02-08T14:49:06Z")

</div>

Hat denn wirklich niemand eine Idee oder einen Tip?

Danke,  
Andreas

---

<div class="post-metadata">

**Author:** ![Sunsara](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sunsara](https://forum.shopware.com/u/Sunsara)\
**Post date:** [11. Februar 2016 um 16:47 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/7 "2016-02-11T16:47:45Z")

</div>

wirklich gar niemand?

---

<div class="post-metadata">

**Author:** ![Sunsara](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sunsara](https://forum.shopware.com/u/Sunsara)\
**Post date:** [14. Februar 2016 um 10:53 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/8 "2016-02-14T10:53:37Z")

</div>

Scheint also kein Fehler sondern ein Feature zu sein…

---

<div class="post-metadata">

**Author:** ![DanielNogel](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DanielNogel](https://forum.shopware.com/u/DanielNogel)\
**Post date:** [14. Februar 2016 um 13:51 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/9 "2016-02-14T13:51:15Z")

</div>

Hi,

du machst den Aufruf über die Konsole? Ich denke, das hängt letztendlich daran, dass der Stack beim Konsolen-Aufruf anders aussieht, als beim Browser-Aufruf. Das Problem wird hier verursacht:

```
        $request = Shopware()->Front()->Request();
        $system = new sSystem($request);
        Shopware()->Container()->set('System', $system);

        $system->sMODULES = Shopware()->Modules();
        $system->sSMARTY = Shopware()->Template();
        $system->sCONFIG = $config;
        $system->sMailer = Shopware()->Mail();

        if (Shopware()->Container()->initialized('Session')) {
            $system->_SESSION = Shopware()->Session();
            $system->sSESSION_ID = Shopware()->SessionID();
            if ($request !== null && Shopware()->Session()->Bot === null) {
                /** @var $plugin Shopware_Plugins_Frontend_Statistics_Bootstrap */
                $plugin = Shopware()->Plugins()->Frontend()->Statistics();
                Shopware()->Session()->Bot = $plugin->checkIsBot($request->getHeader('USER_AGENT'));
            }
            $system->sBotSession = Shopware()->Session()->Bot;
        }

```

Der Code geht davon aus, dass entweder ein gültiges Request-Objekt vorliegt oder $request “NULL” ist. Das scheint bei aber noch was anderes zu sein - ich kann es aber nicht nachstellen, im Standard scheint das so zu funktionieren.

Als Workaround kann ich sonst nur vorschlagen, den Cronjob doch über die URL zu machen (/backend/cron)&nbsp;- das wäre vll. einen Versuch wert.

Daniel

---

<div class="post-metadata">

**Author:** ![AutoFrau](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@AutoFrau](https://forum.shopware.com/u/AutoFrau)\
**Post date:** [23. April 2016 um 08:07 UTC](https://forum.shopware.com/t/seo-index-via-cron-fatal-error-call-to-a-member-function-getheader-in-bootstrap-php-on-line-83/34238/10 "2016-04-23T08:07:32Z")

</div>

Hallo!

Hast Du dafür eigentlich eine Lösung gefunden? Wenn ich bei mir den Cron manuell aufrufe, passiert gar nichts (auch keine Fehlermeldung), das SEO Index Refresh wird aber - wie bei Dir - automatisch auf inaktiv gesetzt. Ich vermute mal, das selbiges passiert, wenn der Cron serverseitig angestoßen wird. Denn ich kann das so oft auf aktiv stellen, wie ich will. Immer, wenn ich das nächste mal nachschaue, steht es wieder auf inaktiv.

LG,

Nicole
