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)

hypedave 04-11-2002 11:08 PM

Quote:

Originally posted by nakkid
i'm glad you got it working. good luck with your site. :)
although, try to keep your queries under 40, if you dont want to see your host knocking at your door... :D


heheh what you talking bout willis, im my own host hehehe\
but how would i keep queries under 40

TECK 04-11-2002 11:15 PM

reduce the number of queries by removing any unnecessary hacks.
vbPortals is known for adding a huge amount of queries to your main page. the optimal no. of queries for a board is max. 40. after that you start to get your server on the red side. immagine that you have 1000 users and they proccess 60queries at the same time. that's 60,000 queries in the same fraction of time. that can double easy if they do a mix between the frontpage (average 90 queries for vbPortal) and vBulletin.
wajones did an excellent job with the portal, but in my personal oppinion i think it puts alot of stress on the server.

try this, place {getmicrostats} in your homepage. let me know the results. ;)

also keep in mind that an unhacked board have only 17queries.

NTLDR 04-11-2002 11:17 PM

I'm getting no where with this hack :(

Would it be posible for someone to send me the changed files so I could compare them with what I've got?

I know I'm doing something wrong, I just can see what! I've followed all the instructions and tried 20+ times to get this hack working on a non-hacked board.

Thanks In Advance,
Lee

hypedave 04-11-2002 11:25 PM

Quote:

Originally posted by nakkid
reduce the number of queries by removing any unnecessary hacks.
vbPortals is known for adding a huge amount of queries to your main page. the optimal no. of queries for a board is max. 40. after that you start to get your server on the red side. immagine that you have 1000 users and they proccess 60queries at the same time. that's 60,000 queries in the same fraction of time. that can double easy if they do a mix between the frontpage (average 90 queries for vbPortal) and vBulletin.
wajones did an excellent job with the portal, but in my personal oppinion i think it puts alot of stress on the server.

try this, place {getmicrostats} in your homepage. let me know the results. ;)

also keep in mind that an unhacked board have only 17queries.

that was my forums homepage

hypedave 04-11-2002 11:31 PM

well this is what I got on the acutal main page ( vbportals )

Page generated in 0.5270550 seconds (92.09% PHP - 7.91% MySQL) with 9 queries.
PHP version 4.0.6 (Debug mode) with GZIP library compression enabled (level 1). [details]

TECK 04-11-2002 11:33 PM

wow.. that's great, wajones changed the code structure?? i used to see people here posting that they got 120queries... i never installed vbPortals.

NTLDR, add me to your messenger. i will help you. ;)

hypedave 04-11-2002 11:41 PM

yeah vbportals has been nothing but succes for my site

hypedave 04-11-2002 11:45 PM

ok I will add you to my buddy list

NTLDR 04-12-2002 05:45 PM

Quote:

Originally posted by nakkid
NTLDR, add me to your messenger. i will help you. ;)
Sorry its taken me so long to get back to you nakkid, I ended up falling asleep before I read your reply last night :)

If the offer of help still stands I've added you to my Messenger contact list.

Thank You
Lee

TECK 04-13-2002 12:16 AM

np lee. just contact me. i will help you install this hack. is my pleasure to give you a hand on this issue.

NTLDR 04-13-2002 05:07 PM

Thank you nakkid,

Its peope like you that make this such a great community to be part of :D

NTLDR 04-13-2002 09:16 PM

I've just had a thought, I tried to run repair.php, I can't use that as it requires MySQL 3.23 or higher, I have MySQL 3.22.23 and PHP 4.1.2, could this be the problem, that this hack won't work with those versions?

Ian 04-13-2002 10:09 PM

According to vBulletin.com vBulletin shouldn't even run on that low of a version... I'd upgrade ASAP.

NTLDR 04-14-2002 04:08 PM

I've got vBulletin working fine, I haven't had any problems with it, I've got to change host as my current one has provided me v.bad service lately.

Anyway, thanks to nakkid, I have got this hack working on my forums :D

He's a real creadit to the vb.org community, great hack and even better support, thank you nakkid.

TECK 04-14-2002 10:19 PM

credit? no. but thanks for the nice words. as for the help, i try to do as much as i can. i'm glad we got it working. ;)

ryanhulce 04-16-2002 05:25 PM

This is a very cool hack thanks!

TECK 04-20-2002 10:02 PM

Quote:

Originally posted by ryanhulce
This is a very cool hack thanks!
glad you like it. ;)

DWZ 04-21-2002 12:48 AM

Just installed it, looks great :D

But, I dont understand this part of the install instructions:
Code:

+-----------------------------------------------+
| 'no template' Mod                            |
+-----------------------------------------------+
| Find this code:
+--------------------------------------------------------------------------+
    eval("\$microstats = \"".gettemplate('home_microstats')."\";");
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| Replace it with:
+--------------------------------------------------------------------------+
    $microstats = "Page generated in $trimmedtime seconds ($percentphp - $percentsql) with $query_count queries.<br>
                  $adminstats";
+--------------------------------------------------------------------------+

It works fine without it, but im confused to what it does, and what 'no template' Mod means...

Anyway, keep up the good work :)

Alan (DWZ)

TECK 04-21-2002 01:51 AM

is for people who dont want to add a template, but instead to hard code it.. i do this all the time, i dont add templates. so i made it in 2 ways: for those who want a template based code or for those who want the actual php code. that's all. :)

DWZ 04-21-2002 02:16 AM

Quote:

Originally posted by nakkid
is for people who dont want to add a template, but instead to hard code it.. i do this all the time, i dont add templates. so i made it in 2 ways: for those who want a template based code or for those who want the actual php code. that's all. :)
oh, ok cool :)

Thanks for your help :D

Humble Magii 04-22-2002 02:59 AM

Hi could someone maybe help me... I am trying to get this to display on my main page. I am using vBPortal and it only shows the amount of queries everything else is blank if I use what is in the getmicrostats template. Anyone else try doing this yet or what? I have to insert this into the VBP config.php file in the footer section I know just dunno how to get it to display :). I don't have a footer template for VBP from what I can gather sifting thru my templates. Anyhoo thx for any help and nakkid you did a fine job.

mashby 04-22-2002 04:04 PM

I'm trying to install this hack, but I'm running into a problem with the first edit. :ermm: In global.php I'm supposed to change
PHP Code:

if (isset($showqueries)) {
  
$pagestarttime microtime();
} else {
  
$pagestarttime 0;


But in my global.php I have the following:
PHP Code:

if (isset($explain)) {
  
$showqueries=1;
}
if (isset(
$showqueries)) {
  
$pagestarttime=microtime();


Before I proceeded, I wanted to check here and see what I should be replacing.

TECK 04-23-2002 12:01 AM

replace:
PHP Code:

if (isset($showqueries)) {
  
$pagestarttime=microtime();


with:
PHP Code:

$pagestarttime=microtime(); 

you probably dont have 225 installed. in the install file, read below the 225 segment, it will tell you how to install it for other versions.

mashby 04-23-2002 01:00 PM

Nakkid - thanks for the fast reply.

According to my control panel, I have 2.2.5 installed. I always keep up with the latest version of vB. However, now that I'm adding hacks to the mix, I may delay installing them so fast and wait until I know that my small collection of hacks will work.

The point is, I do have the latest version of vB installed. So, if this code does not look kosher, then perhaps it did not install correctly?

I'm going ahead with the code snippet you gave me and proceed from there and I'll let you know how it goes. Everything else appears like it will work just fine.

Thanks again Nakkid.

TECK 04-23-2002 10:55 PM

ok.. let me know. i'm sure you will get it working perfectly. :)
just make sure you follow at letter the instructions, there is alot of code to be changed.

all the best,
nakkid.

mashby 04-24-2002 02:12 AM

Nakkid,

Yes, thanks to your input the hack worked just fine. However, I've run into another bug with the register process, so I un-installed the hack just to make sure it wasn't your hack. It wasn't. :knockedout:

But it appears that the Country Flag Hack I installed the day before is the cultprit. So, once I track down the bug, I plan on re-installing your hack.

Thanks again for all your help and I'll let you know how it goes.

TECK 04-24-2002 02:42 AM

you are welcome mashby. ;)

tkeil69575 04-25-2002 01:01 AM

hi nakkid,

I'm having the same problems NTLDR was having, my templates arent working anymore, as soon as I upload the new function.php. What was the fix for NTLDR - was it a provider problem?

greetings Tina

TECK 04-25-2002 02:31 AM

he wasnt sure how to insert the code into the files.
also he had a problem with the PHP version, he was running a really old one on his localhost. read more in the thread here. about what version he had.

contact your host and ask him to upgrade asap. older php code have bugs.

mashby 04-25-2002 08:54 AM

Well, I found part of my problem. I re-installed 2.2.5 to clear out all the hacks and to make sure that everything was hack free.

I re-installed the Welcome Panel hack and then this hack. Everything appears to be ok, except now when I go into the Control Panel, I get nothing. No page renders at all.

Everything else appears to be working just perfectly. The stats are appearing on each page as expected, all other sections of the site are great, but I simply cannot access the Control Panel.

This is the source from the Control Panel
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>


tkeil69575 04-25-2002 10:08 AM

Quote:

Originally posted by nakkid
he wasnt sure how to insert the code into the files.
also he had a problem with the PHP version, he was running a really old one on his localhost. read more in the thread here. about what version he had.

contact your host and ask him to upgrade asap. older php code have bugs.

Hi Nakkid,
thanks for your reply. I've read all that, but he doesnt really go into detail. Well, the newest verison of PHP is installed on my server, so that's not the problem. I do admit I have some hacks installed on 2.2.5 and I guess that's what's causing the problems. However, I dont want to miss out on those hacks. The hacks I have installed are the same ones FireFly has here and he's obviously got the vbmicrostats working, so theoretically there must be some way that it should also work for me ... It's really a pity that it's such a senstive, although cool script.

greetings Tina.

TECK 04-25-2002 12:52 PM

you edited admin/global.php
read carefully the install instructions.

Thomas P 04-26-2002 05:53 PM

Hi,

thanks for this hack, great stuff. :)
cu,
-Tom


Hack installed in 0.87553499 minutes (80.31% Copy - 19.69% Paste) with 0 queries. ;)

TECK 04-27-2002 12:09 AM

Quote:

Originally posted by tkeil69575
I dont want to miss out on those hacks. The hacks I have installed are the same ones FireFly has here and he's obviously got the vbmicrostats working, so theoretically there must be some way that it should also work for me...
tina, the hack should not interfere with any other one.. it's all related to microtime.

Erwin 04-27-2002 12:45 AM

I've got over a hundred hacks on my forum, and this hack does not interfere with any of them.

Admin 04-27-2002 04:55 PM

nakkid, you are using an undefined constant in your code (DEBUG). This causes the "Debug Mode" flag to be on no matter what.

TECK 04-27-2002 05:11 PM

you are referring at $PHP_SELF? it doesnt really matter since i want to read the actual file i view. let me know if i'm correct.

Admin 04-27-2002 05:17 PM

Quote:

Originally posted by nakkid
yr referring at $PHP_SELF? it doesnt really matter since i want to read the actual file i view. let me know if i'm correct.
No, I am talking about DEBUG - a constand. You have in your code something like this:
Code:

$debug = (DEBUG) ? 'Debug Mode' : '';
Which is not correct, because there is no such constant. Not in PHP nor in vBulletin.
And since vBulletin runs on error reporting level of 7, PHP doesn't warn you and treats it as a string. And since that string always evaluates to TRUE, you will always get 'Debug Mode'.

TECK 04-27-2002 05:39 PM

you are right firefly... doughh.. :cross-eyed:
here it is what i did:
---------------------------------
in functions.php add $debug, before $microstats, like that:
PHP Code:

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

then i inserted this code:
PHP Code:

if ($debug==0) {
  
$debugmode="";
} else {
  
$debugmode="(Debug mode)"

should i use the define();? all i want to do is check what is the DEBUG mode on the apache server. let me know if the code is reliable. thanks.

Admin 04-28-2002 10:05 AM

Apache's configuration has nothing to do with PHP. $debug is a variable set by vBulletin (well, the admin sets it in config.php if he wants to use debugging options). Debug mode refers to vBulletin, not PHP / the server.


All times are GMT. The time now is 08:07 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.01561 seconds
  • Memory Usage 1,840KB
  • 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
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (8)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