Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
Eduardo
Worker
Worker


Joined: Jul 20, 2004
Posts: 189
Location: Italy

PostPosted: Wed Dec 10, 2014 10:36 am Reply with quote

Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /home/XXXXXXX/public_html/mainfile.php on line 58

This also causes an increase in the size of the font.
Can anyone help me to solve this problem?
The server is Hostinger.
PHP Version 5.3.29


Last edited by Eduardo on Sun Dec 14, 2014 2:20 am; edited 1 time in total 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Wed Dec 10, 2014 11:05 am Reply with quote

Are you using RN 2.51 or 2.50? There were changes made to 2.51 to address this issue. If you are running 2.50, line 57 - 77 in mainfile.php will look something like this:

Code:


if ($phpver >= '4.0.4pl1' && isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'],'compatible')) {
   if (extension_loaded('zlib')) {
      @ob_end_clean();
      ob_start('ob_gzhandler');
   }
} elseif ($phpver > '4.0' && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && !empty($_SERVER['HTTP_ACCEPT_ENCODING'])) {
   if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
      if (extension_loaded('zlib')) {
         $do_gzip_compress = true;
         ob_start(array('ob_gzhandler',5));
         ob_implicit_flush(0);
         if (strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
            header('Content-Encoding: gzip');
         }
      }
   }
}

if (!@ini_get('register_globals')) {
   @import_request_variables('GPC', '');
}


and needs to be changed to:

Code:


if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && @extension_loaded('zlib') && !headers_sent()) {
   ob_start('ob_gzhandler');
   ob_implicit_flush(0);
}

if (@ini_get('date.timezone') == '') {
   date_default_timezone_set("America/New_York");
}

if (!@ini_get('register_globals')) {
   extract($_GET, EXTR_OVERWRITE);
   extract($_POST, EXTR_OVERWRITE);
   extract($_COOKIE, EXTR_OVERWRITE);
}

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
Eduardo
PostPosted: Wed Dec 10, 2014 11:16 am Reply with quote

I am using 2.51
 
Eduardo
PostPosted: Wed Dec 10, 2014 1:37 pm Reply with quote

mainfile.php is correct.
The problem occurred when I changed server-provider that is Hostinger.

Please see the following topic:

Only registered users can see links on this board! Get registered or login!

I modified only the following function:

Code:
function message_box() {

   global $admin, $admin_file, $bgcolor1, $bgcolor2, $cookie, $currentlang, $db, $multilingual, $prefix, $textcolor2, $user;
   if ($multilingual == 1) {
      $querylang = 'AND (mlanguage=\'' . $currentlang . '\' OR mlanguage=\'\')';
   } else {
      $querylang = '';
   }
   $result = $db->sql_query('SELECT * FROM ' . $prefix . '_message WHERE active=1 ' . $querylang);
   if ($numrows = $db->sql_numrows($result) == 0) {
      return;
   } else {
      while ($row = $db->sql_fetchrow($result)) {
         $groups = $row['groups'];
         $mid = $row['mid'];
         $title = $row['title'];
         $content = $row['content'];
         $mdate = $row['date'];
         $expire = $row['expire'];
         $view = $row['view'];
         if (!empty($title) && !empty($content)) {
            if ($expire == 0) {
               $remain = _UNLIMITED;
            } else {
               $etime = (($mdate+$expire)-time())/3600;
               $etime = (int)$etime;
               if ($etime < 1) {
                  $remain = _EXPIRELESSHOUR;
               } else {
                  $remain = _EXPIREIN.' '.$etime.' '._HOURS;
               }
            }
            if ($view > 5 AND in_groups($groups)) {
               OpenTable();
               echo '<div class="text-center"><span class="option thick message_box" style="color: ' . $textcolor2 . ';">' . $title . '</span></div><br />' . "\n";
               echo '<div class="content">' . $content . '</div>' . "\n";
               if (is_admin($admin)) {
                  echo '<br /><br /><div class="text-center"><span class="content">[ ' . _MVIEWGROUPS . ' - ' . $remain . ' - <a href="' . $admin_file . '.php?op=editmsg'
                     . '&amp;mid=' . $mid . '">' . _EDIT . '</a> ]</span></div>' . "\n";
               }
               CloseTable();
               echo '<br />';
            } elseif ($view == 5 AND paid()) {
               OpenTable();
               echo '<div class="text-center"><span class="option thick message_box" style="color: ' . $textcolor2 . ';">' . $title . '</span></div><br />' . "\n"
                  . '<div class="content">' . $content . '</div>' . "\n";
               if (is_admin($admin)) {
                  echo '<br /><br /><div class="text-center"><span class="content">[ ' . _MVIEWSUBUSERS . ' - ' . $remain . ' - <a href="' . $admin_file . '.php?op=editmsg'
                     . '&amp;mid=' . $mid . '">' . _EDIT . '</a> ]</span></div>';
               }
               CloseTable();
               echo '<br />';
            } elseif ($view == 4 AND is_admin($admin)) {
               OpenTable();
               echo '<div class="text-center"><span class="option thick message_box" style="color: ' . $textcolor2 . ';">' . $title . '</span></div><br />' . "\n"
                  . '<div class="content">' . $content . '</div>' . "\n"
                  . '<br /><br /><div style="text-align: center;"><span class="content">[ ' . _MVIEWADMIN . ' - ' . $remain . ' - <a href="' . $admin_file . '.php?op=editmsg'
                  . '&amp;mid=' . $mid . '">' . _EDIT . '</a> ]</span></div>';
               CloseTable();
               echo '<br />';
            } elseif ($view == 3 AND is_user($user) || is_admin($admin)) {
               OpenTable();
               echo '<div class="text-center"><span class="option thick message_box" style="color: ' . $textcolor2 . ';">' . $title . '</span></div><br />' . "\n"
                  . '<div class="content">' . $content . '</div>' . "\n";
               if (is_admin($admin)) {
                  echo '<br /><br /><div class="text-center"><span class="content">[ ' . _MVIEWUSERS . ' - ' . $remain . ' - <a href="' . $admin_file . '.php?op=editmsg'
                     . '&amp;mid=' . $mid . '">' . _EDIT . '</a> ]</span></div>';
               }
               CloseTable();
               echo '<br />';
            } elseif ($view == 2 AND !is_user($user) || is_admin($admin)) {
               OpenTable();
               echo '<div class="text-center"><span class="option thick message_box" style="color: ' . $textcolor2 . ';">' . $title . '</span></div><br />' . "\n"
                  . '<div class="content">' . $content . '</div>' . "\n";
               if (is_admin($admin)) {
                  echo '<br /><br /><div class="text-center"><span class="content">[ ' . _MVIEWANON . ' - ' . $remain . ' - <a href="' . $admin_file . '.php?op=editmsg'
                     . '&amp;mid=' . $mid . '">' . _EDIT . '</a> ]</span></div>';
               }
               CloseTable();
               echo '<br />';
            } elseif ($view == 1) {
               OpenTable();
               echo '<div class="text-center"><span class="option thick message_box" style="color: ' . $textcolor2 . ';">' . $title . '</span></div><br />' . "\n"
                  . '<div class="content">' . $content . '</div>' . "\n";
               if (is_admin($admin)) {
                  echo '<br /><br /><div class="text-center"><span class="content">[ ' . _MVIEWALL . ' - ' . $remain . ' - <a href="' . $admin_file . '.php?op=editmsg'
                     . '&amp;mid=' . $mid . '">' . _EDIT . '</a> ]</span></div>';
               }
               CloseTable();
               echo '<br />';
            }
            if ($expire != 0) {
               $past = time()-$expire;
               if ($mdate < $past) {
                  $db->sql_query('UPDATE ' . $prefix . '_message SET active=0 WHERE mid=\'' . $mid . '\'');
               }
            }
         }
      }
   }
}


I think that this change should not create problems.

So what can be?
 
nuken
PostPosted: Sat Dec 13, 2014 5:02 pm Reply with quote

See if you can turn zlib.output_compression off with a custom php.ini file of have your host turn it off. There seems to be a bug in php 5.3x that my be responsible. I do not know if that is the case though.
 
Eduardo
PostPosted: Sun Dec 14, 2014 2:19 am Reply with quote

Everything is just so.
The php 5.3.29 in parameter zlib.output_compression there is on.
Many thanks for your help.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©