SocialEngine 4: HTTP_ACCEPT_ENCODING

Have you ever had the problem appear within SE 4.1.8+ with the following error:

Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/mysite/public_html/application/index.php on line 116
We’re sorry!
We are currently experiencing some technical issues. Please try again later.

Error code: 850649

This problem can be fixed in two ways the first:

The server your site is on could not be supporting compression (gzip).

Do an environment check via the admin panel to check this.

The Second way to fix the problem is:

application/index.php

Find

// Get Gzipping Option
if( file_exists( APPLICATION_PATH_SET . DS . 'cache.php' ) ) {
  $cache_array = include APPLICATION_PATH_SET . DS . 'cache.php';
  if( isset( $cache_array['frontend']['core']['gzip'])  ) {
    if( $cache_array['frontend']['core']['gzip'] == TRUE ){
      if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
    }
  }
}

Replace with:

// Get Gzipping Option
if( file_exists( APPLICATION_PATH_SET . DS . 'cache.php' ) ) {
  $cache_array = include APPLICATION_PATH_SET . DS . 'cache.php';
  if( isset( $cache_array['frontend']['core']['gzip'])  ) {
    if( $cache_array['frontend']['core']['gzip'] == TRUE ){
      if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
    }
  }
}

This should fix your problem is the first fix was not the cause.

I recommend that you make sure, that the Apache module mod_deflate is installed and active on the server. You can check this with your host.

Looking for quality SocialEngine Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , | Posted under SocialEngine | RSS 2.0

Author Spotlight

Andrew Cross

Andrew Cross

Hi, I'm Andrew. A am a 25, ICT Administrator which offers support to company's around the South Wales Area. I have created a few social sites for myself and other company's. So far 2 out of 3 have been successful using the powerful SocialEngine Script. I continue to try and help the community of SocialEngine by giving Support and Technical Help where possible.

2 Comments on SocialEngine 4: HTTP_ACCEPT_ENCODING

  1. mel says:

    Hi..
    i’m having a problem to view certain website, it continues to post this message.

    Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/v2blabla/public_html/application/index.php on line 116
    We’re sorry!
    We are currently experiencing some technical issues. Please try again later.
    Error code: e16a19

    what can i do to fix it. can you guide me step by step.
    thank you very much.

    • Andrew Cross Andrew Cross says:

      Have you tried following the instuctions within the blog?

      What version of SE are you runing?

      Have you contacted your host to ensure the right settings are in place?

      Did you try editing the code as advised within the blog?

Leave a Reply

Your email address will not be published. Required fields are marked *


8 − = 3

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>