vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vbMicroStats: page load time, queries, GZIP and PHP version (https://vborg.vbsupport.ru/showthread.php?t=35811)

Deep Blue 06-26-2002 07:08 PM

OK, this is a weird one

I'm including a html file to use as a header using : require("http://www.invasionworks.com/includes/header.htm");

From the vB CP templates bit.

Now when i link directly to http://forums.invasionworks.com i get this error
Warning: Cannot add header information - headers already sent by (output started at /home/invasion/public_html/forums/global.php:2) in /home/invasion/public_html/forums/admin/functions.php on line 1610

but if i link to : http://forums.invasionworks.com/index.php?

it works without a hitch,

I'm using a fresh copy of vB, installed hacks, and then re uploaded modified files.

Any ideas?

Bro_Joey_Gowdy 06-27-2002 03:46 AM

Nice hack...

Below are my stats -

Quote:

Page generated in 4.45685601 seconds (100.00% PHP - 0.00% MySQL) with 22 queries.
[Debug Mode OFF] [PHP v4.1.2] [GZIP disabled]
are these good or bad ??

Deep Blue 06-27-2002 05:57 AM

Ok, i know why that happens, if you go back a couple of pages in this thread that problem is explained, my forum looks awefull atm tho, with the header errors that im getting, any clues folks?

TECK 06-27-2002 08:32 PM

Quote:

Originally posted by Bro_Joey_Gowdy
Nice hack...

Below are my stats - are these good or bad ??

you didnt hack the db_mysql.php file corectly.

Quote:

Originally posted by Deep Blue
Ok, i know why that happens, if you go back a couple of pages in this thread that problem is explained, my forum looks awefull atm tho, with the header errors that im getting, any clues folks?
is it a problem like wierd colors? what php version you use? or you get parse errors?

Boofo 06-27-2002 09:04 PM

Nakkid,

My server load stats show now. Now will you give me the code for putting the load stats in the Admin Quik Stats? :)

Xelation 06-27-2002 11:53 PM

how could I combine these two together?



PHP Code:

// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
  
// parses replacement vars

  
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg,$bbuserinfo;
  static 
$vars;

  if (
connection_status()) {
    exit;
  }

  if (!isset(
$vars)) {
    
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
  } else {
    
$DB_site->data_seek(0,$vars);
  }

  
$findwords=array(=> '{bbusername}');
  
$replacewords=array(=> "$bbuserinfo[username]<!-- auto name hack -->");
  
$i=1;
  while (
$var=$DB_site->fetch_array($vars) and $i++) {
    if (
$var['findword']!='') {
      
$findwords[$i]=$var['findword'];
      
$replacewords[$i]=$var['replaceword'];
    }
  }
  
$newtext=str_replace($findwords,$replacewords,$newtext); 

and

PHP Code:

// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
  
// parses replacement vars

  
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg,$microstats;
  static 
$vars;

  if (
connection_status()) {
    exit;
  }

  if (!isset(
$vars)) {
    
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
  } else {
    
$DB_site->data_seek(0,$vars);
  }

  
$findwords=array(=> '{getmicrostats}');
  
$replacewords=array(=> $microstats);
  
$i=1;

  while (
$var=$DB_site->fetch_array($vars) and $i++) {
    if (
$var['findword']!="") {
      
$findwords[$i]=$var['findword'];
      
$replacewords[$i]=$var['replaceword'];
    }
  }

  
$newtext=str_replace($findwords,$replacewords,$newtext); 



???

TECK 06-28-2002 03:23 AM

Quote:

Originally posted by Boofo
Nakkid,
My server load stats show now. Now will you give me the code for putting the load stats in the Admin Quik Stats? :)

is best to ask in that thread this question, is not related to vbMicroStats. i will post there.

TECK 06-28-2002 03:34 AM

Quote:

Originally posted by Xelation
how could I combine these two together?
find:
Code:

$findwords=array(0 => '{getmicrostats}');
$replacewords=array(0 => $microstats);

replace it with:
Code:

$findwords=array(0 => '{getmicrostats}', 1 => '{bbusername}');
$replacewords=array(0 => $microstats, 1 => $bbusername);


Bro_Joey_Gowdy 06-28-2002 04:44 AM

Quote:

Originally posted by Nakkid
you didnt hack the db_mysql.php file corectly.

Thanks for the help - I somehow skipped over that step

:rolleyes:

heres my stats now:

Quote:

Page generated in 0.13275900 seconds (32.71% PHP - 67.29% MySQL) with 22 queries.
[Debug Mode OFF] [PHP v4.1.2] [GZIP disabled]
So are these good or bad ?

TECK 06-28-2002 04:45 AM

22queries is very good. :)


All times are GMT. The time now is 02:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01916 seconds
  • Memory Usage 1,766KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete