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)

Admin 03-12-2002 09:29 AM

Quote:

Originally posted by Jadelit
Ok done.
Actuall you need to state that the forum is powered by vBulletin, which is copyright Jelsoft. (you can only omit the version)

dyt4 03-12-2002 11:29 AM

right now, when I click on the details link, I've got a nice blank page without details :(

can you again help me plz

thx

TECK 03-12-2002 01:31 PM

do you use some wierd java frames? you cannot get a blank page because look what i get me on your page... btw 66 queries? your server is exploding right now..

dyt4 03-12-2002 01:49 PM

ok the details link is made of
PHP Code:

$PHP_SELF$... 

and here are shots , I don't understand

sHORTYWZ 03-12-2002 02:14 PM

OK I was having 150ish queries on my frontpage too and I finally figured out what it is.. and I imagine it's the same for most people.

The "Number of Active User's Today" hack creates a HUGE amount of queries on your frontpage (one for every user who has visited today.)

Because of this hack I have 100+ on my main page yet my thread and other forum pages are around 15-20.. just thought I'd share some wisdom =)

TECK 03-12-2002 03:17 PM

Quote:

Originally posted by dyt4
ok the details link is made of
PHP Code:

$PHP_SELF$... 


i checked the attachment.. and in the file this is what i see:
PHP Code:

$PHP_SELF?explain=

check your code properly, you probably played with it.. ;)

sHORTYWZ, do you get a blank page? let me know people.
thanks.
btw, firefly have the same hack installed on the main page.. let's convince him to tell us how he did it (ofcourse on a new thread).
someone please open a thread in Help. ;)

dyt4 03-12-2002 03:56 PM

Maybe I'm stupid :paranoid: LOL
But I didn't play with the code here is a sample of my functions.php :

PHP Code:

// ###################### Start dooutput #######################
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 (how many digits you want to show)
  
$digits=7;

  
$totaltime=$endtime[0]-$starttime[0];
  
$trimmedtime=number_format($totaltime,$digits);
  
$percentphp=number_format(((($totaltime-$querytime)/$totaltime)*100), 2)."% PHP";
  
$percentsql=number_format((($querytime/$totaltime)*100), 2)."% MySQL";

  if (
$bbuserinfo['usergroupid']==6) {
    if (
$gzipoutput==1) {
      
$gziptext="biblioth?que GZIP disponible (niveau $gziplevel)";
    } else {
      
$gziptext="biblioth?que GZIP non disponible";
    }
    
$debugmode=(DEBUG)?" (Debug mode)":"";
    
$versionphp=phpversion();
    
$adminstats="Version PHP  $versionphp $debugmode avec $gziptext. [<a href=\"$PHP_SELF?explain=1\" target=\"_blank\">d?tails</a>]";
  } else {
    
$adminstats="";
  }

  if (
$showqueries) {
    
$vartext .= "<!-- Page generated in $totaltime seconds with $query_count queries -->";
  } else {
    eval(
"\$microstats = \"".gettemplate('home_microstats')."\";");
  }
  if (!
$showqueries) {
    echo 
dovars($vartext,$sendheader);
    
flush();
  } else {
    
$output=dovars($vartext,$sendheader);
    echo 
"\n<b>Page generated in $totaltime seconds with $query_count queries,\nspending $querytime doing MySQL queries and ".($totaltime-$querytime)." doing PHP things.</b></pre>";
    
flush();
  }


as you can see I didn't play with this code :classic:

TECK 03-12-2002 04:21 PM

you are correct. the code is perfect. and you are a smart person, never say this.. that you are stupid.
i'm sure you did a great job on installing it correctly.. however we still have that problem on hand, right?
anyone else had this problem?

PS. when you post code like that, please attach it to a .txt file due to jelsoft copyrights.. i think. firefly told me something about this. he will post a comment here i'm sure if something is wrong.. ;)

sHORTYWZ 03-12-2002 04:33 PM

No I don't have a blank page.. everything works great for me.

TECK 03-12-2002 05:40 PM

k ;) anyone else?

Grower 03-12-2002 06:30 PM

Quote:

| Template: home_microstats (optional) |
+-----------------------------------------------+
| Do this only if you want to edit easier your vbMicroStats look.
| NOTE: This will add an extra query
You can get around that extra query if you cache microstats template in global.php around line 250:
PHP Code:

$templatesused.=',pagenav,pagenav_curpage,pagenav_firstlink,pagenav_lastlink,pagenav_nextlink,pagenav_pagelink,pagenav_prevlink,home_microstats'


TECK 03-12-2002 06:58 PM

excellent point Grower. i completly forgot about it. :D

TECK 03-12-2002 07:18 PM

Quote:

Originally posted by Jawelin
Nakkid! Are you leaving or not !?!? :squareeyed:
Are the others so 'professional' ????
:cool:

yesssss they all are.. :)
and yes i'm leaving in exacly 15min.. whohooooo!!!!!
i love to stick with vB.org.. is this dedication or what???

all the best.. i will go to internet cafe to check you guys out.. dont forget about me!!!
cheers,
nakkid.

dyt4 03-12-2002 07:20 PM

Quote:

honeymoon
you're so lucky ;)

Jadelit 03-12-2002 10:19 PM

Quote:

Originally posted by FireFly

Actuall you need to state that the forum is powered by vBulletin, which is copyright Jelsoft. (you can only omit the version)

Ok, done.. I added a little style to it also.. hehe looks nice..

Jadelit 03-12-2002 10:23 PM

Hmm.. thats odd.. I had 93 queries but here are my stats now..

Page generated in 0.3840470 seconds (97.91% PHP - 2.09% MySQL) with 29 queries.
PHP version 4.1.2 (Debug mode) with GZIP library compression enabled (level 9). [details]

JulianD 03-13-2002 05:04 AM

seems great... pressing the install button :)

dyt4 03-13-2002 10:25 AM

I've tried with windows 2000 Pro and XP Pro with netscape 6.2, IE6 nothing, but with opera 6 it works ! ?

TECK 03-13-2002 02:43 PM

try this dyt4, in function dooutput(), in the global line add [high]$PHP_SELF[/high], right after $microstats. let me know.

dyt4 03-13-2002 04:30 PM

I've tried but always the same thing :(

Gutspiller 03-14-2002 06:25 PM

My forum front page shows this:

Page generated in 0.0918310 seconds (-669.55% PHP - 769.55% MySQL) with 92 queries.

I think it's fawkered. :(

TECK 03-15-2002 05:24 PM

this is extremly high.. :alien: :dead: check your hacks..

Bane 03-16-2002 10:06 AM

Page generated in 0.6798900 seconds (100.00% PHP - 0.00% MySQL) with 29 queries.

That seem odd to you? ;p

cerebro 03-16-2002 07:20 PM

i install but i deleted
if ($bbuserinfo['usergroupid']==6) {
if ($gzipoutput==1) {
$gziptext="GZIP library compression enabled (level $gziplevel)";
} else {
$gziptext="GZIP library compression disabled";
}
$debugmode=(DEBUG)?" (Debug mode)":"";
$versionphp=phpversion();
$adminstats="PHP version $versionphp $debugmode with $gziptext. [<a href=\"$PHP_SELF?explain=1\" target=\"_blank\">details</a>]";
} else {
$adminstats="";
}
becauso i dont what to use that...thanks

David Bott 03-16-2002 07:46 PM

nakkid...

Just so you know, the negative numbers seems to have something to do with the server time somehow and has nothing to do with the web browser that I can see. I say this for here is a reading from my main site page...

Page generated in 0.3543150 seconds (86.99% PHP - 13.01% MySQL) with 19 queries.


And here is a reading again from the same site after using SEARCH...

Page generated in 0.4924000 seconds (-6,852.20% PHP - 6,952.20% MySQL) with 13 queries.

Notice the speed is still all good and even less queries...But...the time it takes the server to do things it needs seems to mess things up.

Not sure why...for it does not happen on this site with the serach. But it does on my server and always seems to give a negitive when the server is taking it's time even though the page is generated quickly.

Note...my site is not small by any means...

http://www.avsforum.com/avs-vb

Hope this helps. Not sure how...But hope it does.

David Bott
AVS Forum

dxb 03-17-2002 01:36 PM

I'm getting the exact same problem that David Bott

==============================

Page generated in 0.7519780 seconds (-1,907.81% PHP - 2,007.81% MySQL) with 26 queries.
PHP version 4.0.5 (Debug mode) with GZIP library compression enabled (level 3).

===================================

scotty 03-17-2002 02:01 PM

hm weired - the first few seconds everything worked fine with that hack, but round about a minute after installing it all users became this error:

Quote:

Invalid SQL: INSERT INTO session (sessionhash,userid,host,useragent,lastactivity,lo cation) VALUES ('84359734a0c822c487019565d2c15f','1','80.133.*.*' ,'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;','1016380059','/board/index.php?s=')
mysql error: Duplicate entry '84359734a0c822c487019565d2c15f' for key 1

mysql error number: 1062
the error showed up in den "admin" too, when I want to shut off the board...

...what could it be?

bevor this error the microstats where correctly displayed in my footer...

Ghard296 03-18-2002 12:31 AM

Works perfect for me! Thanks.

TECK 03-21-2002 05:36 PM

Quote:

Originally posted by David Bott
nakkid...

Page generated in 0.4924000 seconds (-6,852.20% PHP - 6,952.20% MySQL) with 13 queries.

Notice the speed is still all good and even less queries...But...the time it takes the server to do things it needs seems to mess things up.
Hope this helps. Not sure how...But hope it does.

David Bott
AVS Forum

hmm that's odd. it should be the same no matter what.. and you are right, it's related directly to the server performance, the hack reads the speed your server operate the page creation.

Jawelin 03-21-2002 09:25 PM

Hi. As said, finally installed the 1.6 version... and worked fine...
Just recently I noticed my server changed configuration: now I see Debug Mode on and GZip disabled after a long time I used it without problem (level 1 for minimum cpu load...)
Verified even with phpinfo ... now HTTP_ACCEPT_ENCODING variable isn't present any more... :(

I'm on a shared server.
Could I change any way this configuration ? How could I verify it in php.ini ?

Thanks a lot.
Bye

Jawelin 03-21-2002 09:58 PM

I still obtain negative values (i.e. ending times smaller than starting times in db_mysql ... :surprised: :surprised: ) !!!!

For example, on DETAILS against my forumhome page, I got something like:
Quote:

Page generated in -0.484897 seconds with 36 queries,
spending 0.47043216228485 doing MySQL queries and -0.95532916228485 doing PHP things.
The same page gave these percentages:
Quote:

Page generated in 0.20868 seconds (-118.92% PHP v4.1.2 - 218.92% MySQL) with 35 queries.
:dead:

Pragmatically, how could I correct in functions.php out-of-scale values of mySql times ? I though something like val % 100, but... :laugh:

Thanks

JDD 03-22-2002 10:59 AM

for me it's the same, installed the latest version (on vB 2.2.4), and from time to time I get negative values:

this is an result for my forum home page:
Quote:

Page generated in 0.5797920 seconds (-8.82% PHP - 108.82% MySQL) with 23 queries.
PHP version 4.0.6 (Debug mode) with GZIP library compression disabled. [details]
I am sure that I hacked the files correctly (checked it several times)

Strange is that the timedisplay is positive but the percentage values are negative

I put {getmicrostats} into the footer template

Greets
JDD

wooolF[RM] 03-22-2002 01:01 PM

same here...

cihangir 03-23-2002 07:16 PM

same here:

Quote:

Page generated in 0.0731950 seconds (-1,558.43% PHP - 1,658.43% MySQL) with 24 queries.
PHP version 4.0.6 (Debug mode) with GZIP library compression enabled (level 1). [details]
but i get negative values only on the frontpage. (installed on v2.2.4 and 'no template' Mod )

forumuser 03-23-2002 09:38 PM

do you guys ever have a problem editing files, like some files just wont accept anymore text or something? WHat is up with that? I cant install this hack cause the file wont take anymore text

NetherChris 03-26-2002 01:00 AM

Why does it always show Debug Mode as on? It's spefically disabled in PHP... but on all other notes this hack is WONDERFUL!

scotty 03-26-2002 04:36 AM

please help!
----
the first few seconds after installing everything worked fine with that hack, but round about a minute after installing it all users became this error:

Quote:

Invalid SQL: INSERT INTO session (sessionhash,userid,host,useragent,lastactivity,lo cation) VALUES ('84359734a0c822c487019565d2c15f','1','80.133.*.*' ,'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;','1016380059','/board/index.php?s=')
mysql error: Duplicate entry '84359734a0c822c487019565d2c15f' for key 1

mysql error number: 1062
the error showed up in den "admin" too, when I want to shut off the board...

...what could it be?

bevor this error the microstats where correctly displayed in my footer...

any suggestions?

THX!

TECK 03-26-2002 07:02 AM

Quote:

Originally posted by JDD
for me it's the same, installed the latest version (on vB 2.2.4), and from time to time I get negative values:

Strange is that the timedisplay is positive but the percentage values are negative

it must be related to your server? i never get a negative value. the best example is vB.org site. firefly can back me up on this, because he had checked my code. ;)

Kyomu 03-26-2002 08:37 PM

Quote:

Originally posted by JDD
for me it's the same, installed the latest version (on vB 2.2.4), and from time to time I get negative values:

this is an result for my forum home page:


I am sure that I hacked the files correctly (checked it several times)

Strange is that the timedisplay is positive but the percentage values are negative

I put {getmicrostats} into the footer template

Greets
JDD

I get the same thing. I think it has to do with being in a shared environment.

TECK 03-26-2002 10:22 PM

Quote:

Originally posted by Jawelin
I still obtain negative values (i.e. ending times smaller than starting times in db_mysql ... :surprised: :surprised: ) !!!!

For example, on DETAILS against my forumhome page...

i'm convinced is a server issue Jawelin. as you see, even in unhacked (details) mode you get negativs. i wish i could do something but i cant. you should contact your host. let me know what they said.. it might help others who have the same prob.


All times are GMT. The time now is 05:00 AM.

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.02319 seconds
  • Memory Usage 1,857KB
  • 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
  • (5)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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