# "Cannot send headers; headers already sent" - Warum lassen sich ESD-Artikel nicht laden oder öffnen?

**URL:** <https://forum.shopware.com/t/cannot-send-headers-headers-already-sent-warum-lassen-sich-esd-artikel-nicht-laden-oder-offnen/56531>\
**Category:** Programmierung\
**Created:** [19. November 2018 um 10:35 UTC](https://forum.shopware.com/t/cannot-send-headers-headers-already-sent-warum-lassen-sich-esd-artikel-nicht-laden-oder-offnen/56531 "2018-11-19T10:35:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shesmile](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@shesmile](https://forum.shopware.com/u/shesmile)\
**Post date:** [19. November 2018 um 10:35 UTC](https://forum.shopware.com/t/cannot-send-headers-headers-already-sent-warum-lassen-sich-esd-artikel-nicht-laden-oder-offnen/56531/1 "2018-11-19T10:35:14Z")

</div>

Hallo,

ich biete in meinem Shop fast ausschließlich PDF-Dateien zum Sofortdownload an (ESD-Artikel)

**Leider kommt es bei jedem Download zu folgender Fehlermeldung (siehe unten)** welche dafür sorgt, dass die Dateien fehlerhaft geladen werden und nicht geöffnet werden können. Vorallem tritt das Problem im Safari auf. Also auf iPhone, iPad, MacBook und Co. Im Firefox klappt es meistens ohne Probleme die Datei zu öffnen. Den Error bekomme ich aber trotzdem ausgelöst und zugeschickt.

Ich hoffe jemand kann mir helfen. Das Problem bestand auch schon in meinem alten Virtuemart-Shop unter Joomla.&nbsp;

Ich nutze aktuell Shopware 5.5.3 mit PHP 7.0

&nbsp;

CRITICAL

Message:

```
 Cannot send headers; headers already sent in /www/htdocs/.../shop/engine/Shopware/Controllers/Frontend/Account.php, line 455

```

Time:

```
 2018-11-19T10:30:55.027271+0100

```

Channel:

```
 core

```

request:

```
 { "uri": "/shop/account/download/esdID/42359", "method": "GET", "query": { "module": "frontend", "controller": "account", "action": "download", "esdID": "42359" }, "post": [] }

```

session:

```
 No session data available

```

shopId:

```
 1

```

shopName:

```
 shesmile Shop

```

CRITICAL

Message:

```
 Cannot send headers; headers already sent in /www/htdocs/.../shop/engine/Shopware/Controllers/Frontend/Account.php, line 455

```

Time:

```
 2018-11-19T10:30:55.104471+0100

```

Channel:

```
 core

```

request:

```
 { "uri": "/shop/account/download/esdID/42359", "method": "GET", "query": { "module": "frontend", "controller": "account", "action": "download", "esdID": "42359" }, "post": [] }

```

session:

```
 No session data available

```

shopId:

```
 1

```

shopName:

```
 shesmile Shop

```

ERROR

Message:

```
 RuntimeException: Cannot send headers; headers already sent in /www/htdocs/.../shop/engine/Shopware/Controllers/Frontend/Account.php, line 455 in /www/htdocs/.../shop/engine/Library/Enlight/Controller/Response/ResponseHttp.php:373 Stack trace: #0 /www/htdocs/.../shop/engine/Library/Enlight/Controller/Response/ResponseHttp.php(203): Enlight\_Controller\_Response\_ResponseHttp-\>canSendHeaders(true) #1 /www/htdocs/.../shop/engine/Shopware/Plugins/Default/Core/HttpCache/Bootstrap.php(883): Enlight\_Controller\_Response\_ResponseHttp-\>setHeader('Surrogate-Contr...', 'content="ESI/1....') #2 /www/htdocs/.../shop/engine/Shopware/Plugins/Default/Core/HttpCache/Bootstrap.php(379): Shopware\_Plugins\_Core\_HttpCache\_Bootstrap-\>addSurrogateControl(Object(Enlight\_Controller\_Response\_ResponseHttp)) #3 /www/htdocs/.../shop/engine/Library/Enlight/Event/Handler/Default.php(91): Shopware\_Plugins\_Core\_HttpCache\_Bootstrap-\>onPostDispatch(Object(Enlight\_Controller\_ActionEventArgs)) #4 /www/htdocs/.../shop/engine/Library/Enlight/Event/EventManager.php(220): Enlight\_Event\_Handler\_Default-\>execute(Object(Enlight\_Controller\_ActionEventArgs)) #5 /www/htdocs/.../shop/engine/Library/Enlight/Controller/Action.php(235): Enlight\_Event\_EventManager-\>notify('Enlight\_Control...', Object(Enlight\_Controller\_ActionEventArgs)) #6 /www/htdocs/.../shop/engine/Library/Enlight/Controller/Dispatcher/Default.php(548): Enlight\_Controller\_Action-\>dispatch('downloadAction') #7 /www/htdocs/.../shop/engine/Library/Enlight/Controller/Front.php(222): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #8 /www/htdocs/.../shop/engine/Shopware/Kernel.php(202): Enlight\_Controller\_Front-\>dispatch() #9 /www/htdocs/.../shop/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #10 /www/htdocs/.../shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(448): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(Object(Shopware\Kernel), Object(Symfony\Component\HttpFoundation\Request), 1, true) #11 /www/htdocs/.../shop/engine/Shopware/Components/HttpCache/AppCache.php(268): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #12 /www/htdocs/.../shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(420): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #13 /www/htdocs/.../shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(317): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>fetch(Object(Symfony\Component\HttpFoundation\Request), true) #14 /www/htdocs/.../engine/Shopware/Components/HttpCache/AppCache.php(189): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #15 /www/htdocs/.../shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(192): Shopware\Components\HttpCache\AppCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #16 /www/htdocs/.../shop/engine/Shopware/Components/HttpCache/AppCache.php(116): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /www/htdocs/.../shop/shopware.php(122): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #18 {main}

```

Time:

```
 2018-11-19T10:30:55.106215+0100

```

Channel:

```
 core

```

request:

```
 { "uri": "/shop/account/download/esdID/42359", "method": "GET", "query": { "module": "frontend", "controller": "account", "action": "download", "esdID": "42359" }, "post": [] }

```

session:

```
 No session data available

```

shopId:

```
 1

```

shopName:

```
 shesmile Shop

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [19. November 2018 um 11:07 UTC](https://forum.shopware.com/t/cannot-send-headers-headers-already-sent-warum-lassen-sich-esd-artikel-nicht-laden-oder-offnen/56531/2 "2018-11-19T11:07:43Z")

</div>

Tritt der Fehler auch ohne Http Cache auf?

---

<div class="post-metadata">

**Author:** ![shesmile](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@shesmile](https://forum.shopware.com/u/shesmile)\
**Post date:** [19. November 2018 um 11:12 UTC](https://forum.shopware.com/t/cannot-send-headers-headers-already-sent-warum-lassen-sich-esd-artikel-nicht-laden-oder-offnen/56531/3 "2018-11-19T11:12:12Z")

</div>

Kannst du mir das genauer erklären? Kann man das so einfach abschalten? Dann würde ich es mal testen.

---

<div class="post-metadata">

**Author:** ![hanno\_walk](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@hanno\_walk](https://forum.shopware.com/u/hanno_walk)\
**Post date:** [21. Februar 2019 um 09:36 UTC](https://forum.shopware.com/t/cannot-send-headers-headers-already-sent-warum-lassen-sich-esd-artikel-nicht-laden-oder-offnen/56531/4 "2019-02-21T09:36:21Z")

</div>

> [@Shyim schrieb:](https://forum.shopware.com/profile/20792/Shyim "Shyim")
> 
> Tritt der Fehler auch ohne Http Cache auf?

Moin, Shyim,

ich hatte das gleiche Problem: Der Fehler tritt **nicht** auf wenn man die Seite ohne **Http Cache** betreibt

&nbsp;

Gruß Hanno

&nbsp;

&nbsp;
