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

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. 

Ich nutze aktuell Shopware 5.5.3 mit PHP 7.0

 

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

 

Tritt der Fehler auch ohne Http Cache auf?

2 Likes

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

@Shyim schrieb:

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

 

Gruß Hanno