Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
andrej
Hangin' Around



Joined: Sep 10, 2005
Posts: 48

PostPosted: Wed Mar 21, 2007 6:25 pm Reply with quote

Hello !

I recently installed PHP121 chat ontop of RavenNuke 7.6.
At about that point i realised the number of guests is not displayed in the user/site info block.
I changed the block file back to the original, but it still doesn't work. I realised that only registered users are in the session table, but no guests.
Does anyone know a solution for this problem ?

Thanks !
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Mar 21, 2007 10:38 pm Reply with quote

Turn display errors on in your nuke config.php file and check your server error_log for messages.
 
View user's profile Send private message
andrej







PostPosted: Fri Mar 30, 2007 3:13 am Reply with quote

There are no error messages.
 
Raven







PostPosted: Fri Mar 30, 2007 6:38 am Reply with quote

If it works w/o php121 chat but not with it, then my guess is that there is a variable naming clash, meaning the 2 apps are using one or more variables with the same name and php121 is stepping on userinfo. About the only way to figure it out is to list the variable names from the smaller program and then compare those to the larger program.
 
andrej







PostPosted: Sun Apr 01, 2007 12:54 am Reply with quote

I have isolated the problem...

It's in the mainfile.php
At the same time as installing php121 i changed the following code in mainfile.php

FROM :

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 (ereg("MSIE", $_SERVER['HTTP_USER_AGENT'])) {
      header('Content-Encoding: gzip');
      }
    }
  }
}


TO:

Code:
if (42 >= '4.0.4pl1') 

{
ob_start('ob_gzhandler');
}else if (42 > '4.0') {
  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 (ereg("MSIE", $_SERVER['HTTP_USER_AGENT'])) {
      header('Content-Encoding: gzip');
      }
    }
  }
}


With the first mainfile.php i get a bunch of "header's already sent" errors ( and i have tried pratically evey solution suggested on this forum ), with the second one i get rid of the headers errors, but guests are not in the session table...
 
Raven







PostPosted: Sun Apr 01, 2007 4:04 am Reply with quote

If installing php121 is causing headers already sent errors, then I would not agree that you should be changing mainfile.php. Reason being that you are changing code that affects all of nuke whether or not php121 is being used. php121 seems to be the problem, not nuke.

BTW, your code if (42 >= '4.0.4pl1') will always test TRUE so the only code that will ever get called is ob_start('ob_gzhandler');. The ELSEIF logic will never get called so in effect you can completely disregard everything in that section of code and replace it with one line of code: ob_start('ob_gzhandler'); which is nothing like what that section of code is supposed to be doing.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

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 ©