Benaesan

About me: Web Developer, interested in new technologies.
Location:

Send private message

You must be logged in to send a private message.

Group membership

Activity

  • Benaesan replied on the discussion topic Problem with system messages
    Ok thank, it seem to be the problem, will fix it manually for now and check later for a better end solution. view reply
  • Benaesan replied on the discussion topic Problem with system messages
    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... view reply
  • Benaesan replied on the discussion topic Problem with system messages
    That weird because i've only unzip the elgg-2-3-3.zip from elgg and just follow the 6 step from Elgg installation. And that working on my local webserver. Production server => PHP 5.6.31, apache 2.4 We see that append on some pages, not... view reply
  • Benaesan replied on the discussion topic Problem with system messages
    No I make a fresh install, just take the zip file install from elgg.org for testing. No 3rd party, only the default bundle plugins. I'm agree with you for the bug in the sender version and the duplicate header, but we have several Elgg... view reply
  • Benaesan replied on the discussion topic Problem with system messages
    Sorry for that.  So the problem is that the message doeesn't appear for user. In my log file, there is a duplicated header. After investigation in Response.php in vendor/symfony there a function : public function sendHeaders()... view reply
  • Benaesan joined the group French Community Group
  • Benaesan replied on the discussion topic Problem with system messages
    By the way, I'm testing with 2 fresh install. view reply
  • Benaesan added a new discussion topic Problem with system messages in the group Beginning Developers
    Hello everyone,  We have a problem with system message with the Elgg 2.3.3 versions, don't really know why, but works with Elgg 1.12.16. On my development environment it's works (Wampserver 3.0.6 on Win10, with Apache...
    • 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.