In my log phperror:
[Tue Nov 14 09: 59: 19 2017][error][client 82.#.#.#][host devcon5.jade - rs.com]AH10157: FastCGI: An error happend on Fastcgi processing, fallback to CGI
[Tue Nov 14 09: 59: 26 2017][error][client 82.#.#.#][host devcon5.jade - rs.com]AH10144: FastCGI: comm with server "/homez.370/#/#/#/index.php" aborted: error parsing headers: duplicate header 'Content-Type', referer: http: //#.#.com/
In the session object (vendor/elgg/elgg/engine/classes/Elgg/systemMessageService.php) I put a dump =>
It show 2 times like the engine make a redirection:
[attributes] => Symfony \\ Component \\ HttpFoundation \\ Session \\ Attribute \\ AttributeBag Object ( [name: Symfony \\ Component \\ HttpFoundation \\ Session \\ Attribute \\ AttributeBag: private] => attributes ted: error parsing headers: duplicate header 'content-type', referer: https: //jaders.jade-rs.com/activity ( [0] => You must be logged in to view the requested page.) )
the second time, error message is void, and doesn't appear on screen.
We fixed it with the Response.php like mentionned before, but that only a temporary solution.
After investigation in Response.php in vendor/symfony there a function :
public function sendHeaders() { // headers have already been sent by the developer if (headers_sent()) { return $this; } if (!$this->headers->has('Date')) { $this->setDate(\DateTime::createFromFormat('U', time())); } // headers foreach ($this->headers->allPreserveCase() as $name => $values) { foreach ($values as $value) { header($name.': '.$value, true, $this->statusCode); } }
if the header function, we pass the bolded value to "true" so the message system works.
Is that a bug ?
It might be a bug in symphony that shows with FastCGI used (https://github.com/symfony/symfony/issues/21204).
I guess for the time being you can only fix it manually in sendHeaders() or not use FastCGI.
Ok thank, it seem to be the problem, will fix it manually for now and check later for a better end solution.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.