I am get the following error:

[Zend_Http_Exception] Invalid header line detected.

In the terminal when running such below commands as:

  • php bin/magento cache:flush or
  • php bin/magento setup:upgrade

This issue seems to come out of no where. I have looked around the internet and have found people with the same issue recently but no solutions.

I was wondering if anyone has managed to get a solid fix for this or knows what the cause is?

  • Adding full stack trace, and also anything in magentos error logs would be helpful. – Chris Anderson Nov 15 '18 at 19:34
  • in-fact there is no error logged – Nimit Dudani Nov 17 '18 at 6:35
  • @flyingmomo- what happened when you tried to integrate m2 with Linnworks? What integration method used? We have got the same problem, but if we try your solution we would also be stuck as too we use Linnworks. We're using a litemage cache version from July 2018. – Tucker Nov 29 '18 at 16:32

We had the same problem which was caused by the litemage caching extension. Reinstalling with the latest version of litemage solved the problem you mentioned.

But there is another problem when we tried to integrate m2 with Linnworks and the same error occurred in exception log when we tried to activate the integration. Frustrated!

  • @Tucker I still could not integrate with Linnworks. We use the API integration instructed by Linnworks but we have had error message on the integration page when we click activate: Unable to post data to consumer due to an unexpected error. but if you check the exception.log you will see this: ain.CRITICAL: Invalid header line detected {"exception":"[object] (Zend_Http_Exception(code: 0): Invalid header line detected at ../public_html/vendor/magento/zendframework1/library/Zend/Http/Response.php:371)"} [] – flyingmomo Dec 10 '18 at 11:47

Maybe this is a bit late. However, I have suggested a fix that won't get override by the composer update here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.