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)

Flash69 03-23-2003 05:49 AM

Triple post, server was not responding.

dethfire 03-24-2003 03:06 AM

my serverload doesn't show up, any ideas?

TECK 03-24-2003 02:38 PM

Your server doesn't support the exec( 'uptime' ) function.
Contact your host.

94supratt 03-26-2003 12:57 AM

I installed this on 2.3.0 and got this....

Quote:

Page generated in 1,048,647,125.57871699 seconds (100.00% PHP - 0.00% MySQL) with 27 queries.
Thats it? I don't think page generated is correct.

Wolf42 03-31-2003 06:46 AM

TECK, thank you for the fix for vB 2.3.0. Couse I had to uninstall after upgrade. But now its working again! :D

feldon23 03-31-2003 05:49 PM

The dovars replacement does not even remotely match what's in my vB2.3.0. :(

ManagerJosh 04-01-2003 04:41 AM

Something isn't right TECK with this code:

PHP Code:

function dooutput($vartext,$sendheader=1) {

  global 
$pagestarttime,$query_count,$showqueries,$querytime,$DB_site,$gzipoutput,$gziplevel,$bbuserinfo,$microstats;

  
$pageendtime=microtime();
  
$starttime=explode(" ",$pagestarttime);
  
$endtime=explode(" ",$pageendtime);

  
// time format
  
$digits 8;
  
$totaltime $endtime[0] - $starttime[0] + $endtime[1] - $starttime[1];
  
$trimmedtime number_format$totaltime $digits );
  
$percentphp number_format( ( ( ( $totaltime $querytime ) / $totaltime ) * 100 ) , ) . '% PHP';
  
$percentsql number_format( ( ( $querytime $totaltime ) * 100 ) , ) . '% MySQL';

  if ( 
$bbuserinfo['usergroupid'] == )
  {
    
$adminstats '';
    
$serverload '';
    
$versionnum phpversion();
    
$debugmode 'Debug Mode OFF';
    
$gziptext 'GZIP disabled';
    if ( 
$debug == )
    {
      
$debugmode 'Debug Mode <font color="{ hovercolor}">ON</font>';
    }
    if ( 
$gzipoutput == )
    {
      
$gziptext 'GZIP <font color="{ hovercolor}">enabled</font> - level ' $gziplevel;
    }
    if ( 
$stats = @exec'uptime' ) )
    {
      
preg_match'/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/' $stats $regs );
      
$serverload ' [Server Load: <font color="{ hovercolor}"><b>' $regs[1] . '</b></font> ? ' $regs[2] . ' : ' $regs[3] . ']';
    }
    
$adminstats '<br />[' $debugmode '] [PHP v' $versionnum '] [' $gziptext ']' $serverload;
  }

  if (
$showqueries) {
    
$vartext .= "<!-- Page generated in $totaltime seconds with $query_count queries -->";
  } else {
    eval( 
'$microstats = "' gettemplate'microstats' ) . '";' );
  } 

I followed all the directions for the 2.3.0 version but when I upload, I get a blank page.

USODJA 04-01-2003 10:15 AM

Read the instructions again, I had the same problem, traced it to the functions.php, took a clean version slowly redid it then it worked, if those } are not in the exact place, then it crashes, also remove the space before all the hoover comments...

Erwin 04-01-2003 10:28 AM

The dovars bit in the Final Release of 2.3.0 is different to the fix TECK posted. You can work around it, but I'm sure TECK will post an updated fix for the Final Release soon. :) I managed to get mine working by slowly comparing the codes in any case...

SgtSling 04-01-2003 11:41 AM

the reason why it won't work with the version 3.0 is because it calls the wrong template
recheck the instructions


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.01687 seconds
  • Memory Usage 1,762KB
  • 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
  • (1)bbcode_php_printable
  • (1)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