View Full Version : vbMicroStats: page load time, queries, GZIP and PHP version
TLfuRy
03-04-2003, 12:42 PM
I installed the new version of this hack after upgrading to 2.3.0, and nothing shows up in my footer now. I have uploaded the original files and re-applied the hack three times....and I'm sure I'm doing it right.
Any thoughts?
Xenon
03-04-2003, 12:50 PM
Teck is currently not availabla, becaus of making holidays for three weeks ;)
but i can say the hack works with 2.3.0 on my board, so you must do something wrong i think...
TLfuRy
03-04-2003, 12:54 PM
Thanks. I'll try it again.
Ghostsuit
03-04-2003, 02:34 PM
I installed the new version of this hack after upgrading to 2.3.0, and nothing shows up in my footer now. I have uploaded the original files and re-applied the hack three times....and I'm sure I'm doing it right.
Any thoughts?I had this problem as well. You need to name the template microstats not home_microstats as it says in the instructions.
TLfuRy
03-04-2003, 02:45 PM
That worked! Thanks!
Doubledoom
03-04-2003, 05:49 PM
Installed and working for me on 2.3.0 RC3 with VBportal 3.0 (2.2) and showing on portal and forum pages correctly.
Needs correction as mentioned a little earlier but apart from that its fine.
Craigr
03-09-2003, 06:38 PM
Thanks.
Craig
Talisman
03-13-2003, 06:49 PM
Hi all,
Just installed this and ran into the conflict replacing variables in the dovars section of the ADMIN/functions.php file between this hack and Chen's {bbusername} auto name hack.
On pages 29 and 40/41 of this thread, I read that we can integrate the two by finding this in Teck's vbMicroStats hack:
$findwords=array(0 => '{getmicrostats}');
$replacewords=array(0 => $microstats);
$i=1;
And replacing that with this:
$findwords=array(0 => '{getmicrostats}', 1 => '{bbusername}');
$replacewords=array(0 => $microstats, 1 => $bbusername);
$i=2;
Well, this actually did not work in my case. The {bbusername} portion of the variables wasn't correct. To solve it, I had to replace it with this, instead:
$findwords=array(0 => '{getmicrostats}', 1 => '{bbusername}');
$replacewords=array(0 => $microstats, 1 => "$bbuserinfo[username]");
$i=2;
Don't know if anyone else has had a problem with this, but thought I'd mention it, just in case.
Thanks for the great hack, Teck.
Cheers!
<< Now I'm off to lower the number of queries running rampant on all these pages before my site blows up. >>
Flash69
03-23-2003, 05:45 AM
I had problems with this hack working on v 2.2.9 in the dovars section of the ADMIN/functions.php
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,$new text);
I had to change it to:
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,$new text);
}
}
I am a new vbulletin person but I think this is a typo in the main hack posted at the begining of this thread. If no-one else has had this problem please disregard this post. If I made a newbie mistake please disregard this post.
Thanks.
Flash
Flash69
03-23-2003, 05:46 AM
Double post.
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?
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....
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:
function dooutput($vartext,$sendheader=1) {
global $pagestarttime,$query_count,$showqueries,$querytim e,$DB_site,$gzipoutput,$gziplevel,$bbuserinfo,$mic rostats;
$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 ) , 2 ) . '% PHP';
$percentsql = number_format( ( ( $querytime / $totaltime ) * 100 ) , 2 ) . '% MySQL';
if ( $bbuserinfo['usergroupid'] == 6 )
{
$adminstats = '';
$serverload = '';
$versionnum = phpversion();
$debugmode = 'Debug Mode OFF';
$gziptext = 'GZIP disabled';
if ( $debug == 1 )
{
$debugmode = 'Debug Mode <font color="{ hovercolor}">ON</font>';
}
if ( $gzipoutput == 1 )
{
$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
Erwin
04-01-2003, 11:48 AM
No, it's because the code is different - there is an extra bit to check for PHP version etc. that is not in the RC versions.
blippio
04-03-2003, 12:28 AM
Ok. I have installed and uninstalled and re-installed this hack several times. I have read the latest posts about the "dovars" code and I can see that they are different (I am running 2.3 rc2).
My question is this: why do I get the 12323423.43345345 seconds error on my vBHome, but not on my forums page? Also, when installing this hack for the last time, I was refreshing this vbHome page and I suddenly got it work (no "seconds" error), but when I went to the forums, and came back to the vbHome page, the 123123123123.23123124554 seconds error returned.
Is this some clue as to a specific issue with my install?! I know a lot of people are having an issue of getting this to work at all, but mine works fine on the forums, and with erroneous results on my vBHome.
Any ideas?
ManagerJosh
04-03-2003, 04:14 AM
I'm having issues with it myself. I reviewed everything carefully but still running into problems.
My problem is that when I replace what nakkid asked me to replace in the dooutput, I get a blank white page when viewing the forumhome.
Something is very wrong... *frowns*
Ralf vd Enden
04-04-2003, 01:33 PM
I have the same problem as blippio. On the forum page everything works fine, but when I add {getmicrostats} to the footer of the VBHL template the seconds and percentage show weird values.
Is there a fix?
Sebastian
04-05-2003, 08:25 PM
Hey Teck,
There is a little mistake in the .txt file you made for 2.3.0.
i guess you changed the eval template to "microstats" instead of "home_microstats"
but at the end of the file you say to make template "home_microstats"
and the eval() is just "microstats"
I was like "Why the hell won't it show?!" until i figured out it was looking for template "microstats" and the template was called "home_microstats" ;) :p
deepdark
04-07-2003, 04:50 PM
i installed every thing but i dont know why is not working :(
leitel
04-07-2003, 05:06 PM
Me neither. I guess I'll have to wait until SOMEONE can verify their install on 2.3.
Ralf vd Enden
04-07-2003, 05:17 PM
I have VB 2.3.0, VBHL 4.2 and vbMicroStats installed and it works great. The only thing I can't get to work is adding the microstats on the VBHL homepage (in the footer). It shows 100% PHP and a huge figure for the seconds it needed to generate the page.
So if you want verification of all this working on a 2.3.0 installation.... I think I'm the living proof. There's prolly lots more people out there that got it to work.
Entourage
04-09-2003, 08:38 AM
I'm installed it on my vbulletin 2.3.0, also applied the fix voor function.php, I dont get any error now, so that good ;) but when I go to my form, I see this:
:number of digits for microtime
:the time your page is loaded
6 :number of queries executed
:tells if VB is in debug mode
:PHP version
:PHP percent page usage
:MySQL percent page usage
:GZIP compression library
1 :GZIP compression level
:your average server load
as you can see some things are working (well 2 :)) how do I fix the other things to work?
iwearnosox
04-09-2003, 10:10 AM
I just installed it on 2.3. I got errors from cutting and pasting functions.php, but once I uploaded a clean version and tried again it worked.
All parts are functioning:
Page generated in 0.09815001 seconds (58.26% PHP - 41.74% MySQL) with 26 queries.
[Debug Mode OFF] [PHP v4.2.3] [GZIP disabled] [Server Load: 0.53 » 0.47 : 0.41]
Entourage
04-09-2003, 11:23 AM
K, I took a clean verion of functions, gobal and db_mysql and re-edit it with the txt doc of TECK (https://vborg.vbsupport.ru/attachment.php?s=&postid=359609) and everything is working great now! (ps. I only had to rename a template)
generated in 0.09475398 seconds (77.18% PHP - 22.82% MySQL) with 16 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP disabled] [Server Load: 0.09 ? 0.05 : 0.01]
sabret00the
04-09-2003, 02:06 PM
04-01-03 at 01:28 PM Erwin said this in Post #769 (https://vborg.vbsupport.ru/showthread.php?postid=376289#post376289)
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...
will you do it since teck aint?
Mr. X
04-09-2003, 06:34 PM
Just wondering, and sorry if its been posted already, but can and how can I move the [Debug Mode OFF] [PHP v4xxx] [GZIP disabled] [Server Load: xxx» xxx: xxx] line so that it is after the Page Generated line? Im using the PHP based code, not the template to have it appear in my footer. It appears fine for users, but for admins we see the 2nd line, and for some reason its adding an ugly space to my footer. Is there anyway to just move that line up after the Page Generated line, so it'll be just one sentence?
Today at 01:23 PM Entourage said this in Post #781 (https://vborg.vbsupport.ru/showthread.php?postid=379589#post379589)
K, I took a clean verion of functions, gobal and db_mysql and re-edit it with the txt doc of TECK (https://vborg.vbsupport.ru/attachment.php?s=&postid=359609) and everything is working great now! (ps. I only had to rename a template)
generated in 0.09475398 seconds (77.18% PHP - 22.82% MySQL) with 16 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP disabled] [Server Load: 0.09 ? 0.05 : 0.01]
If you clear your browser temp files, you don't even have to rename that template... the typo was corrected my myself about 285 years ago... ;)
Oblivion Knight
04-09-2003, 10:57 PM
Page generated in 0.14942503 seconds (61.14% PHP - 38.86% MySQL) with 22 queries.
[Debug Mode OFF] [PHP v4.1.1] [GZIP disabled]
Everything appears to be working..
I'll contact my host about the server load part of the hack tomorrow.
Thankyou TECK :)
* Oblivion Knight clicks install.
GoTTi
04-11-2003, 09:14 PM
Page generated in 1,050,098,789.69630003 seconds (100.00% PHP - 0.00% MySQL) with 30 queries.
[Debug Mode OFF] [PHP v4.2.1] [GZIP disabled] [Server Load: 0.36 ? 0.62 : 0.79]
how is it that 0% is mySQL? isnt that impossible?
Stadler
04-11-2003, 09:25 PM
> Page generated in 1,050,098,789.69630003 seconds
I think, something went wrong there. Mybe you should recheck all the changes.
Sebastian
04-11-2003, 10:30 PM
Today at 06:08 PM Da_GoTTi said this in Post #786 (https://vborg.vbsupport.ru/showthread.php?postid=380772#post380772)
Page generated in 1,050,098,789.69630003 seconds (100.00% PHP - 0.00% MySQL) with 30 queries.
[Debug Mode OFF] [PHP v4.2.1] [GZIP disabled] [Server Load: 0.36 ? 0.62 : 0.79]
how is it that 0% is mySQL? isnt that impossible?
cool, 100% PHP , its like vitamin C, mysql is not very healthy :p
.. not sure though... check you properly hacked the files.
04-11-03 at 11:08 PM Da_GoTTi said this in Post #786 (https://vborg.vbsupport.ru/showthread.php?postid=380772#post380772)
Page generated in 1,050,098,789.69630003 seconds (100.00% PHP - 0.00% MySQL) with 30 queries.
[Debug Mode OFF] [PHP v4.2.1] [GZIP disabled] [Server Load: 0.36 ? 0.62 : 0.79]
how is it that 0% is mySQL? isnt that impossible?
Search the thread for an answer.
trafix
04-16-2003, 01:01 AM
I have modified everything successfully except the last stage of the anmin/functions there is a major difference in the text that should be there and what is currently there. all i can presume is that either i have a hack that also modifies that area but i cant recognoise it.
this is what should be there
// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
// parses replacement vars
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg;
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);
}
while ($var=$DB_site->fetch_array($vars)) {
if ($var['findword']!="") {
$newtext=str_replace($var['findword'],$var['replaceword'],$newtext);
}
}
This is what is currently in my functions.php
// ###################### Start dovars #######################
function dovars($newtext, $sendheader = 1)
{
// parses replacement vars
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg,$fullpm,$bbuserinfo,$microstats;
static $vars;
if (connection_status())
{
exit;
}
if (!is_array($vars))
{
// build an array of $vars containing find/replace values
$vars = array();
$replacements = $DB_site->query("
SELECT findword, replaceword, replacementsetid
FROM replacement
WHERE replacementsetid IN(-1, '" . intval($replacementsetid) . "')
ORDER BY replacementsetid, replacementid DESC
");
while ($replacement = $DB_site->fetch_array($replacements))
{
if ($replacement['findword'] != '')
{
$vars["$replacement[findword]"] = $replacement['replaceword'];
}
}
unset($replacement);
$DB_site->free_result($replacements);
}
if (PHPVERSION < '4.0.5' or 1)
{
// do each replacement in turn for PHP < 4.0.5
reset($vars);
while(list($find, $replace) = each($vars))
{
$newtext = str_replace($find, $replace, $newtext);
}
}
else
{
// do all replacements in one go (PHP >= 4.0.5 only)
$newtext = str_replace(array_keys($vars), $vars, $newtext);
}
if ($newpmmsg)
{
if (substr($PHP_SELF,-strlen('private.php')) == 'private.php')
{
// do nothing
}
else
{
$newtext = preg_replace("/<body/i", "<body onload=\"Javascript:confirm_newpm()\"", $newtext);
}
}
if ($gzipoutput and !headers_sent())
{
$newtext = gzipoutput($newtext, $gziplevel);
}
if ($sendheader)
{
@header("Content-Length: " . strlen($newtext));
}
return $newtext;
}
// ###################### Start standarderror( #######################
Can anyone help ???
LangTuDaTinh
04-16-2003, 02:30 AM
trafix,, use the old version.(da one from page 1)..it's working.. i tried the new version....i doesn't work...
neocorteqz
04-16-2003, 03:22 AM
Again, I'm using the original install of this hack with no problems, i had the same problem with it showing a 100% PHP.. I believe I was told to rehack db_mysql.php... or something like that.:p
neocorteqz
04-16-2003, 05:55 PM
btw, is this good??
Page generated in 0.29245400 seconds (86.12% PHP - 13.88% MySQL) with 30 queries
thats using the updated version of MySQL(v4.0.12) and php(v4.3.1)
or are the queries still too high? and I'm starting to notice that in thread view there are no more than 30 queries tops...
Oblivion Knight
04-16-2003, 06:15 PM
Today at 06:55 PM User_001 said this in Post #793 (https://vborg.vbsupport.ru/showthread.php?postid=383021#post383021)
btw, is this good??
Page generated in 0.29245400 seconds (86.12% PHP - 13.88% MySQL) with 30 queries
thats using the updated version of MySQL(v4.0.12) and php(v4.3.1)
or are the queries still too high? and I'm starting to notice that in thread view there are no more than 30 queries tops...
Yes that's good :)
As long as you're below 40 queries on any page, then your database isn't under too much load.
86.12% PHP is also pretty damn good, mine's only about 64%..
Alien
04-19-2003, 12:57 AM
Works great in my 2.3.0 I'm working on..
Excellent hack, thanks a bunch! :D
installed on 2.30 and working fine, I guess. I don't like the amount of queries...76,lol
Mr. X
04-20-2003, 06:44 AM
04-09-03 at 01:34 PM Mr. X said this in Post #783 (https://vborg.vbsupport.ru/showthread.php?postid=379805#post379805)
Just wondering, and sorry if its been posted already, but can and how can I move the [Debug Mode OFF] [PHP v4xxx] [GZIP disabled] [Server Load: xxx? xxx: xxx] line so that it is after the Page Generated line? Im using the PHP based code, not the template to have it appear in my footer. It appears fine for users, but for admins we see the 2nd line, and for some reason its adding an ugly space to my footer. Is there anyway to just move that line up after the Page Generated line, so it'll be just one sentence?
nvm I got it..
Yesterday at 04:37 AM ap0c said this in Post #796 (https://vborg.vbsupport.ru/showthread.php?postid=384477#post384477)
installed on 2.30 and working fine, I guess. I don't like the amount of queries...76,lol
76 queries??? This is huge, I hope you own the server because if it's a busy site, it will crash it.
Cool stuff , added this without a hitch , was just trying to find out the no. of queries mine was dishing out.
But need some explanation on this :
Page generated in 0.20807695 seconds (30.47% PHP - 69.53% MySQL) with 23 queries.
[Server Load: 0.62 » 0.66 : 0.74]
What does the 30.47% PHP - 69.53% MySQL mean ?
Is 23 queries alright ? Anyway to cut it down ?
And server load bit , what does it mean ?
Sorry if this is out of the topic but didnt know where else to ask.
Thanks
Sanjiyan
04-21-2003, 05:38 AM
Using the 2.3.0 version, and installed on 2.3.0 fine, apart from I get this:
Page generated in 1,050,903,363.6694 seconds (100.00% PHP - 0.00% MySQL) with 24 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP enabled - level 2]
How do I change the Page generated in x.xxxxxxxx down to 1.234 seconds
And
It seems I have 100% PHP Load and 0% MySQL ??
Its running on a Windows XP Box atm.
neocorteqz
04-21-2003, 07:11 AM
Today at 01:38 AM Sanjiyan said this in Post #800 (https://vborg.vbsupport.ru/showthread.php?postid=385005#post385005)
Using the 2.3.0 version, and installed on 2.3.0 fine, apart from I get this:
Page generated in 1,050,903,363.6694 seconds (100.00% PHP - 0.00% MySQL) with 24 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP enabled - level 2]
How do I change the Page generated in x.xxxxxxxx down to 1.234 seconds
And
It seems I have 100% PHP Load and 0% MySQL ??
Its running on a Windows XP Box atm.
change this value
// time format (how many digits you want to show)
$digits=8;
to anything you want, it's located in admin/functions
about 8 lines from
// ###################### Start dooutput #######################
as for the 100% PHP, rehack db_mysql.php, i believe thats the file..
I also have noticed you have your gzip level at 2, i was lead to believe then anything over a 1, wouldn't be any better. and would create more load. anyone else know if this is true??
https://vborg.vbsupport.ru/showthread.php?s=&threadid=38369&highlight=gzip+compression+levels
Yesterday at 10:49 PM TECK said this in Post #798 (https://vborg.vbsupport.ru/showthread.php?postid=384967#post384967)
76 queries??? This is huge, I hope you own the server because if it's a busy site, it will crash it.
I had to do some work:), the 76 queries came from the portal home page. It's down to Page generated in 0.16658294 seconds (83.29% PHP - 16.71% MySQL) with 55 queries, 44 queries for normal members.
the forum home page itself is now at 25 queries which seems about as good as I can get it.
Sanjiyan
04-21-2003, 03:03 PM
Today at 08:11 AM User_001 said this in Post #801 (https://vborg.vbsupport.ru/showthread.php?postid=385016#post385016)
change this value
// time format (how many digits you want to show)
$digits=8;
to anything you want, it's located in admin/functions
about 8 lines from
// ###################### Start dooutput #######################
as for the 100% PHP, rehack db_mysql.php, i believe thats the file..
I also have noticed you have your gzip level at 2, i was lead to believe then anything over a 1, wouldn't be any better. and would create more load. anyone else know if this is true??
https://vborg.vbsupport.ru/showthread.php?s=&threadid=38369&highlight=gzip+compression+levels
I did this for the $digit:
// time format
$digits=4;
$totaltime = $endtime[0] - $starttime[0] + $endtime[1] - $starttime[1];
$trimmedtime = number_format( $totaltime , $digits );
$percentphp = number_format( ( ( ( $totaltime - $querytime ) / $totaltime ) * 100 ) , 2 ) . '% PHP';
$percentsql = number_format( ( ( $querytime / $totaltime ) * 100 ) , 2 ) . '% MySQL';
And its still doing like 12 digitis long, and rehack the db_ file? I followed the install file right, I triple checked, after reading the thread, but its still doing it, I used the 2.3.0 verison of the hack, as I have a 2.3.0 board, or should I apply the older version?
neocorteqz
04-21-2003, 04:42 PM
Today at 11:03 AM Sanjiyan said this in Post #803 (https://vborg.vbsupport.ru/showthread.php?postid=385162#post385162)
I did this for the $digit:
// time format
$digits=4;
$totaltime = $endtime[0] - $starttime[0] + $endtime[1] - $starttime[1];
$trimmedtime = number_format( $totaltime , $digits );
$percentphp = number_format( ( ( ( $totaltime - $querytime ) / $totaltime ) * 100 ) , 2 ) . '% PHP';
$percentsql = number_format( ( ( $querytime / $totaltime ) * 100 ) , 2 ) . '% MySQL';
And its still doing like 12 digitis long, and rehack the db_ file? I followed the install file right, I triple checked, after reading the thread, but its still doing it, I used the 2.3.0 verison of the hack, as I have a 2.3.0 board, or should I apply the older version?
The original instructions Work Great for me. No problems
and
Page generated in 0.1956 seconds (76.11% PHP - 23.89% MySQL) with 30 queries.
don't know why your didn't work... :confused:
Sanjiyan
04-21-2003, 05:35 PM
could it be that I am running it under Apache 2 and Windows XP Pro?
Yesterday at 06:38 AM Sanjiyan said this in Post #800 (https://vborg.vbsupport.ru/showthread.php?postid=385005#post385005)
Using the 2.3.0 version, and installed on 2.3.0 fine, apart from I get this:
Page generated in 1,050,903,363.6694 seconds (100.00% PHP - 0.00% MySQL) with 24 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP enabled - level 2]
How do I change the Page generated in x.xxxxxxxx down to 1.234 seconds
And
It seems I have 100% PHP Load and 0% MySQL ??
Its running on a Windows XP Box atm.
You did not hacked properly the db_mysql.php file.
Sanjiyan
04-23-2003, 02:46 PM
TECH,
I've just reapllied the hack and it still displays 100% for PHP and 0% for MySQL.
I have attached the db_mysql.php file below, if I could borrow some of your time, in looking through the file, just to be sure I would be greatful.
Thanks
Red Blaze
04-23-2003, 05:30 PM
Ok, I got this error.
Parse error: parse error, unexpected $ in /home/thesonic/public_html/vbtesting/admin/functions.php on line 1101
I went to line 1101 and couldn't find that "$".
EDIT: Nevermind, it got fixed on its own. :S
solent
04-24-2003, 01:38 PM
help please
i have installed this hack and i get no errors at all. the problem is that i dont know the exact place to place this stats. and in some of the variables i get no value (see atach file).
can anyone point to me in which templates i need to edit to show the microstats at the bottom of every page as in vb.org?
also is the result shown in the attachment correct or i am doing something wrong with it?
I am using the template based version on vb2.3.0.
Thanks.
greate hack by the way. i love it. :D :D
Red Blaze
04-24-2003, 04:54 PM
You have to place the variable into your footer. Preferably towards the bottom. Read the instructions, it tells you what variable to put.
solent
04-24-2003, 04:56 PM
Today at 07:54 PM Sonikku said this in Post #810 (https://vborg.vbsupport.ru/showthread.php?postid=386509#post386509)
You have to place the variable into your footer. Preferably towards the bottom. Read the instructions, it tells you what variable to put.
To call your vbMicroStats, simply place the string {getmicrostats}
| anywhere you want in your templates (for example in footer).
|
| NOTE: The higher you place the string in your templates,
| the more inacurate your data will be.
|
| The variables you can use are:
|
| $digits - number of digits for microtime
| $trimmedtime - the time your page is loaded
| $query_count - number of queries executed
| $debugmode - tells if VB is in debug mode
| $versionphp - PHP version
| $percentphp - PHP percent page usage
| $percentsql - MySQL percent page usage
| $gziptext - GZIP compression library
| $gziplevel - GZIP compression level
| $serverload - your average server load
those are the final steps but which variable are you talking about?
maybe you mean the string?
have a look here the site is still not in production
http://www.depfacy.com/forums/showthread.php?threadid=12&forumid=39
well i have tried both by parsing the string and using the template and by inputing the whole thing in the footer template.
here is my footer just to tell me what is wrong.
</td>
</tr>
</table>
<!-- /content area table -->
</center>
<TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD><a href="#top"><IMG SRC="{imagesfolder}/footer_01.gif" WIDTH=168 HEIGHT=69 border="0"></a></TD>
<TD background="{imagesfolder}/footer_02.gif" width="100%" height="69"></TD>
<TD><a href="http://www.vbforumskins.com" target="_blank"><IMG SRC="{imagesfolder}/footer_03.gif" WIDTH=530 HEIGHT=69 border="0"></a></TD>
</TR>
<br><center>Page generated in $trimmedtime seconds ($percentphp - $percentsql) with $query_count queries.$adminstats<center>
</TABLE>
</td></tr>
</table>
</center>
is there any possibility that the page loads very fast that no time of % php and sql are recorded?
This is a dedicated machine of 800MHz and 768MB RAM and 10K rpm SCSI drivers and doesnt do anything else but hosting this board which is currently not used.
Also why can i not see the adminstats ?
Search the thread for answers. Those questions were asked (and answered) several times by many other users.
Red Blaze
04-24-2003, 07:14 PM
Sorry TECK, but I'll answer it anyway, some people could be too lazy to search through a 55 page thread. *raises hand* =j
Dude, Just add {getmicrostats} anywhere in your footer Preferably after </table> since there is nothing after it. If you did everything right, {getmicrostats} should call everything that's needed.
solent
04-24-2003, 07:34 PM
Today at 10:14 PM Sonikku said this in Post #813 (https://vborg.vbsupport.ru/showthread.php?postid=386578#post386578)
Sorry TECK, but I'll answer it anyway, some people could be too lazy to search through a 55 page thread. *raises hand* =j
Dude, Just add {getmicrostats} anywhere in your footer Preferably after </table> since there is nothing after it. If you did everything right, {getmicrostats} should call everything that's needed.
i aint lazy just missed the replacment thingy.
and what you said sonikku is not the solutions as that is the first thing i did.
well here are my results dunno if they are good but from what i have read over 100 queries i can be in trouble
forumhome
------------------------------
Page generated in 0.16079295 seconds (65.76% PHP - 34.24% MySQL) with 62 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP enabled - level 1] [Server Load: 0.00 ? 0.03 : 0.00]
vbPortal Home
------------------------------
Page generated in 0.18081701 seconds (54.13% PHP - 45.87% MySQL) with 107 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP enabled - level 1] [Server Load: 0.00 ? 0.03 : 0.00]
Red Blaze
04-24-2003, 10:57 PM
107 Queries?! o.O;;; Daaaaaaamn! Is that natural? Anyway, if that's what you have, then I suppose you're ok. Check out what I have.
Tell, how many hacks do you have installed? And did you add alot of stuff in the head, and the php include?
Sanjiyan
04-24-2003, 11:01 PM
bump for post:
https://vborg.vbsupport.ru/showthread.php?postid=385954#post385954
Sanjiyan, search the thread (use the search option at the bottom of this page). Is your db_mysql.php file that does this. So check that file, there is your prob, not the hack.
solent, please tell me you don't have a busy site, orelse you will have your server account canceled with 107queries on ONE page.
107queries is EXTREMLY high, a total killer for the server.
solent
04-25-2003, 07:19 AM
solent, please tell me you don't have a busy site, orelse you will have your server account canceled with 107queries on ONE page.
107queries is EXTREMLY high, a total killer for the server.
TECK the server is mine and it will be hosted for free in an ISP as they will be our SPONSORS :D :D :D
the server is a 1 800MHZ CPU with 2 cpus cabable, 768MB of SDRAM PC100 and a 7.2K rpm SCSI Drive.
i am running vbportal www.vbportal.com together with vbulletin and maybe that is the reason. vbportal is the beggiset hack made for vbulletin. maybe that is why i am getting all that queries. the server will be probably have 100 concurrent users at the tops.
Sanjiyan
04-25-2003, 07:39 AM
Thanks TECK problems solved, and its working now.
I was having the same problem as in this post:
https://vborg.vbsupport.ru/showthread.php?postid=332047#post332047
Yesterday at 09:19 AM solent said this in Post #818 (https://vborg.vbsupport.ru/showthread.php?postid=386804#post386804)
TECK the server is mine and it will be hosted for free in an ISP as they will be our SPONSORS :D :D :D
the server is a 1 800MHZ CPU with 2 cpus cabable, 768MB of SDRAM PC100 and a 7.2K rpm SCSI Drive.
i am running vbportal www.vbportal.com together with vbulletin and maybe that is the reason. vbportal is the beggiset hack made for vbulletin. maybe that is why i am getting all that queries. the server will be probably have 100 concurrent users at the tops.
Still, you should direct yourself to scripts that use less then 25queries. A script that uses 100queries is really bad written.
solent
04-26-2003, 04:15 PM
ok that sounds resonable enought TECK i will rebuild my board from scratch and this time i will be more carefull on installing hacks.
thanks
SiGmA_X
04-27-2003, 04:57 PM
First off, I love this hack, really great; thank you :)
Now, I have a few comments.. Perhaps they have been covered, but I don't want to read through all of the many posts in this thread..
How does vBulletin figure out how many queries were executed? I am trying to write a script for my main site, but this is stumping me...
vbMicroStats uses @exec("uptime") to figure out the load. The problem is, many professional servers disallow the httpd/www-data user (Might be called something else, but it's the one that Apache spawns under) from executing things such as system() or exec() for obvious security reasons, you would have near-root permissions. On my server, this is the case. Here's what I came up with the get around it; Perhaps not as clean as yours, but it works :)
File: FORUM/admin/functions.php
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].']';
} else {
$serverload='';
}
My Fix:if ( $stats = @fopen('/proc/loadavg', 'r') ) {
if ($fd = fopen('/proc/loadavg', 'r')) {
$load = split(' ', fgets($fd, 4096));
fclose($fd);
} else
$load = array('N.A.','N.A.','N.A.');
$serverload = ' [Server Load: <font color="{ hovercolor}"><b>';
$serverload .= $load[0] . '</b></font> " ' . $load[1] . ' : ' . $load[2] . ']';
}
For me, this has worked flawlessly. The only thing that I can think to go wrong would be the loadavg file not being in /proc/loadavg, but on most (If not all) UNIX/Linux systems, it is there.
If I'm correct, that won't work in safe mode...
Hobbes
05-06-2003, 04:08 AM
I cant get them to show up......
Hobbes
05-06-2003, 04:17 AM
ok, my new attach wouldn't show....
For those having trouble with the functions.php replacement on 2.3.0 Final, replace your entire dovars section with the following code [it works] (NOTE!: this is for an unhacked vB! If you have modified this section at all with other hacks, don't use this!)
// ###################### Start dovars #######################
function dovars($newtext, $sendheader = 1)
{
// parses replacement vars
global $PHP_SELF, $DB_site, $replacementsetid, $gzipoutput, $gziplevel, $newpmmsg, $microstats;
static $vars;
if (connection_status())
{
exit;
}
if (!is_array($vars))
{
// build an array of $vars containing find/replace values
$vars = array();
$replacements = $DB_site->query("
SELECT findword, replaceword, replacementsetid
FROM replacement
WHERE replacementsetid IN(-1, '" . intval($replacementsetid) . "')
ORDER BY replacementsetid, replacementid DESC
");
while ($replacement = $DB_site->fetch_array($replacements))
{
if ($replacement['findword'] != '')
{
$vars["$replacement[findword]"] = $replacement['replaceword'];
}
}
unset($replacement);
$DB_site->free_result($replacements);
}
$newtext = str_replace( '{getmicrostats}' , $microstats , $newtext );
if (PHPVERSION < '4.0.5' or 1)
{
// do each replacement in turn for PHP < 4.0.5
reset($vars);
while(list($find, $replace) = each($vars))
{
$newtext = str_replace($find, $replace, $newtext);
}
}
else
{
// do all replacements in one go (PHP >= 4.0.5 only)
$newtext = str_replace(array_keys($vars), $vars, $newtext);
}
if ($newpmmsg)
{
if (substr($PHP_SELF,-strlen('private.php')) == 'private.php')
{
// do nothing
}
else
{
$newtext = preg_replace("/<body/i", "<body onload=\"Javascript:confirm_newpm()\"", $newtext);
}
}
if ($gzipoutput and !headers_sent())
{
$newtext = gzipoutput($newtext, $gziplevel);
}
if ($sendheader)
{
@header("Content-Length: " . strlen($newtext));
}
return $newtext;
}
ogden2k
05-07-2003, 11:19 PM
Page generated in 0.09366798 seconds (71.57% PHP - 28.43% MySQL) with 21 queries.
Does that sound accurate? Which is better, more php then mysql or the other way around?
Lethal
05-08-2003, 09:11 AM
that looks just fine
Lethal
05-08-2003, 09:19 AM
ok so the reason my serverload is not showing is possibly because my server doesn't allow the @exec("uptime") to be used, at least thats what I have read. If i ask them will they allow it, because I really would like to know what my server load is. Any suggestions on how to get around it?
If you have a problem look at the part of the instructions that say
Template: home_microstats
Do NOT create a new template called home_microstats
*DO* create a template called microstats
and bing, your {getmicrostats} will show up!
vB-Host.com
05-18-2003, 10:13 AM
WoooHooo!!! Page generated in 0.35274894 seconds (60.67% PHP - 39.33% MySQL) with 124 queries. think I need to pull a few hacks off LOL
Any way to add server uptime to the stats?
neocorteqz
05-19-2003, 06:04 AM
Page generated in 0.1907 seconds (90.37% PHP - 9.63% MySQL) with 24 queries.
[Debug Mode OFF] [PHP v4.3.1] [GZIP enabled - level 1] [Server Load: 0.79 ? 0.36 : 0.24]
damn that looks good. :D
<p align="center"><smallfont>
<!-- Do not remove this copyright notice -->
Powered by: vBulletin Version $templateversion<br>
Copyright ©2000 - 2002, Jelsoft Enterprises Limited.<br>
<!-- Do not remove this copyright notice -->
$copyrighttext<br>
{getmicrostats}
</smallfont></p>
i dont get thing at the bottom ! wat could be wrong ?
Thx
Lethal
05-20-2003, 03:19 AM
go over each step and make sure all the code is in the right spot.
Page generated in 0.12096798 seconds (84.99% PHP - 15.01% MySQL) with 20 queries.
is that any good ?
insanctus
05-24-2003, 02:12 AM
Page generated in 0.25907803 seconds (69.56% PHP - 30.44% MySQL) with 23 queries.
Very cool hack ~ clicks install.
SiGmA_X
05-29-2003, 12:12 AM
I love this hack :) Customized it a bit (The damned exec() security hole.. (https://vborg.vbsupport.ru/showthread.php?postid=387989#post387989);)) but it works great. Is there a way to get the Apache version and the MySQL version? Currently I have them hard coded in, but a friend suggested parsing the phpinfo() command to get the versions.. Ideas?
eoc_Jason
05-29-2003, 01:03 AM
The Admin Quick Stats (https://vborg.vbsupport.ru/showthread.php?s=&threadid=37193) might be just what you are looking for. It displays MySQL version & other useful info, I'm sure you can adapt it to display at the bottom if you wanted. I actually had to mod it myself because I use the attachments hack, so it just gets the size of the directory.
Today at 08:12 PM SiGmA_X said this in Post #838 (https://vborg.vbsupport.ru/showthread.php?postid=401382#post401382)
I love this hack :) Customized it a bit (The damned exec() security hole.. (https://vborg.vbsupport.ru/showthread.php?postid=387989#post387989);)) but it works great. Is there a way to get the Apache version and the MySQL version? Currently I have them hard coded in, but a friend suggested parsing the phpinfo() command to get the versions.. Ideas?
If you look for something more complex:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=43232
There is a fix for the attachments as files listed in the first post.
neocorteqz
06-05-2003, 12:14 AM
Today at 02:04 PM TECK said this in Post #840 (https://vborg.vbsupport.ru/showthread.php?postid=404395#post404395)
If you look for something more complex:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=43232
There is a fix for the attachments as files listed in the first post.
One of my favorite hacks. :)
anyways
if the server doesn't support the @exec('uptime'), how could one get the info that doesn't display to display?
You cannot unfortunatelly.
neocorteqz
06-05-2003, 01:44 AM
Today at 09:24 PM TECK said this in Post #842 (https://vborg.vbsupport.ru/showthread.php?postid=404577#post404577)
You cannot unfortunatelly.
Damn, ohh well. thanks for the quick answer.:)
Robink
06-10-2003, 01:55 PM
Works great on 2.3.0, ( I just had to do the renaming of home_microstats to microstats ;))
Only, I dont get the Server load, so I'll ask my host about @exec("uptime") :)
S.Shady
06-10-2003, 04:45 PM
Page generated in 0.08969903 seconds (89.53% PHP - 10.47% MySQL) with 24 queries.
[Debug Mode OFF] [PHP v4.3.2] [GZIP disabled] [Server Load: 1.18 » 2.07 : 1.55]
Im about to check the install to see if i can get it to display the mysql version if there isnt away in there. is there away to add it ?
Glitch
06-11-2003, 05:09 PM
06-05-03 at 02:24 AM TECK said this in Post #842 (https://vborg.vbsupport.ru/showthread.php?postid=404577#post404577)
You cannot unfortunatelly.
Other than turning on magic_quotes_runtime in PHP.INI on a IIS/W2K box, how does one configure the server to support $serverload variable or exec('uptime') to calculate it? Isn't there another way to calculate uptime without using exec('uptime')? I believe that phpmyadmin aquires this information in a different way...
I noticed that the problem of vbPortal has returned with additional text in the admin-box sections so I stripped out;
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] . ']';
}
And the $serverload entry the next line defining $adminstats, and the problem with the extra text in the vbPortal boxes went away...
Just playing around with phpmyadmin, I found this worked with 1 inclusion (page buffer) and extra information you may want to play around with ...
<?php
//**
// * Get core libraries
// */
//if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
// include('./libraries/grab_globals.lib.php');
//}
if (!defined('PMA_COMMON_LIB_INCLUDED')) {
include('./libraries/common.lib.php');
}
/**
* Handles some variables that may have been sent by the code below
*/
if (isset($db)) {
unset($db);
}
if (isset($table)) {
unset($table);
}
/**
* InnoDB status
*/
if (!empty($innodbstatus)) {
echo '<h2>' . "\n"
. ' ' . $strInnodbStat . "\n"
. '</h2>' . "\n";
$sql_query = 'SHOW INNODB STATUS;';
$res = PMA_mysql_query($sql_query, $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), $sql_query);
$row = PMA_mysql_fetch_row($res);
echo '<pre>' . "\n"
. htmlspecialchars($row[0]) . "\n"
. '</pre>' . "\n";
mysql_free_result($res);
include('./footer.inc.php');
exit;
}
/**
* Sends the query and buffers the result
*/
$res = @PMA_mysql_query('SHOW STATUS;', $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), 'SHOW STATUS;');
while ($row = PMA_mysql_fetch_row($res)) {
$serverStatus[$row[0]] = $row[1];
}
@mysql_free_result($res);
unset($res);
unset($row);
/**
* Displays the page
*/
//Uptime calculation
$res = @PMA_mysql_query('SELECT UNIX_TIMESTAMP() - ' . $serverStatus['Uptime'] . ';');
$row = PMA_mysql_fetch_row($res);
echo sprintf($strServerStatusUptime, PMA_timespanFormat($serverStatus['Uptime']), PMA_localisedDate($row[0])) . "\n";
mysql_free_result($res);
unset($res);
unset($row);
?>
Glitch
Xelation
06-12-2003, 05:52 PM
Hey teck, I've got a problem with a step.. its interfering with another hack.. heres the problem on this step
Find:
// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
// parses replacement vars
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg;
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);
}
while ($var=$DB_site->fetch_array($vars)) {
if ($var['findword']!="") {
$newtext=str_replace($var['findword'],$var['replaceword'],$newtext);
}
}
Replace it with:
// ###################### 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(0 => '{getmicrostats}');
$replacewords=array(0 => $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,$new text);
I have this code instead:
// ###################### Start dovars #######################
function dovars($newtext, $sendheader = 1)
{
// parses replacement vars
global $PHP_SELF, $DB_site, $replacementsetid, $gzipoutput, $gziplevel, $newpmmsg;
static $vars;
if (connection_status())
{
exit;
}
if (!is_array($vars))
{
// build an array of $vars containing find/replace values
$vars = array();
$replacements = $DB_site->query("
SELECT findword, replaceword, replacementsetid
FROM replacement
WHERE replacementsetid IN(-1, '" . intval($replacementsetid) . "')
ORDER BY replacementsetid, replacementid DESC
");
while ($replacement = $DB_site->fetch_array($replacements))
{
if ($replacement['findword'] != '')
{
$vars["$replacement[findword]"] = $replacement['replaceword'];
}
}
unset($replacement);
$DB_site->free_result($replacements);
}
if (PHPVERSION < '4.0.5' or 1)
{
// do each replacement in turn for PHP < 4.0.5
reset($vars);
while(list($find, $replace) = each($vars))
{
$newtext = str_replace($find, $replace, $newtext);
}
}
how can I fix this problem? Ive tried many different ways to fix it myself but now your my resort. Hope you can help :)
neocorteqz
06-14-2003, 08:46 AM
has anyone even tried this on vB3?? just curious. :)
DPoole
06-14-2003, 10:15 AM
/me click installs as i forgot to do a while back when i installed it
this should be part of vbull - not an addon as its a lifesaver at times.
S.Shady
06-17-2003, 06:54 AM
04-09-03 at 06:22 PM TECK said this in Post #784 (https://vborg.vbsupport.ru/showthread.php?postid=379888#post379888)
If you clear your browser temp files, you don't even have to rename that template... the typo was corrected my myself about 285 years ago... ;)
sorry to say but not in the 2.3.0 fix. the template typo is still there. in the instructions taking out the home_ is still required for it to work. and i know my temp files arnt the same because i just reformatted my computer and cleared everything when i read that.
sorry for brining that old post up. but just lettin you know.
very good hack. :)
cYbercOsmOnauT
06-28-2003, 05:58 PM
Great hack.. but how about making it fit for 2.3.0 final? ;)
Kriek
06-29-2003, 12:49 AM
/me frantically waves hands in air
I exceedingly concur.
Spark
06-29-2003, 02:46 PM
Page generated in 0.30388701 seconds (36.21% PHP - 63.79% MySQL) with 23 queries.
*click install*
Bison
06-29-2003, 03:32 PM
06-12-03 at 02:52 PM Xelation said this in Post #847 (https://vborg.vbsupport.ru/showthread.php?postid=408149#post408149)
Hey teck, I've got a problem with a step.. its interfering with another hack.. heres the problem on this step
Find:
// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
// parses replacement vars
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg;
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);
}
while ($var=$DB_site->fetch_array($vars)) {
if ($var['findword']!="") {
$newtext=str_replace($var['findword'],$var['replaceword'],$newtext);
}
}
Replace it with:
// ###################### 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(0 => '{getmicrostats}');
$replacewords=array(0 => $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,$new text);
I have this code instead:
// ###################### Start dovars #######################
function dovars($newtext, $sendheader = 1)
{
// parses replacement vars
global $PHP_SELF, $DB_site, $replacementsetid, $gzipoutput, $gziplevel, $newpmmsg;
static $vars;
if (connection_status())
{
exit;
}
if (!is_array($vars))
{
// build an array of $vars containing find/replace values
$vars = array();
$replacements = $DB_site->query("
SELECT findword, replaceword, replacementsetid
FROM replacement
WHERE replacementsetid IN(-1, '" . intval($replacementsetid) . "')
ORDER BY replacementsetid, replacementid DESC
");
while ($replacement = $DB_site->fetch_array($replacements))
{
if ($replacement['findword'] != '')
{
$vars["$replacement[findword]"] = $replacement['replaceword'];
}
}
unset($replacement);
$DB_site->free_result($replacements);
}
if (PHPVERSION < '4.0.5' or 1)
{
// do each replacement in turn for PHP < 4.0.5
reset($vars);
while(list($find, $replace) = each($vars))
{
$newtext = str_replace($find, $replace, $newtext);
}
}
how can I fix this problem? Ive tried many different ways to fix it myself but now your my resort. Hope you can help :)
Looks like you're still using 2.2.9, or trying to use this file [functions.php-v2.29] with 2.30 [hehe, re-applying those hacks can be a pain, huh?] ... you need to fill that whole section with what's included in the zipfile, in both places in the functions.php code. I did the same thing ... that's why I know what you did! ;)
Stadler
06-30-2003, 06:35 PM
Regarding the Problems with @exec('uptime') in SAFE_MODE:
You can specify a safe_mode_exec_dir and move the uptime-script there. So just ask your host, if he does that for you. :)
HTH
d3nnis
07-15-2003, 01:14 PM
how come my display looks weird?
Page generated in 1,058,278,383.14206004 seconds (100.00% PHP - 0.00% MySQL) with 23 queries.
the seconds... I used this attached file to edit.
d3nnis
07-15-2003, 10:52 PM
Yesterday at 11:14 PM d3nnis said this in Post #856 (https://vborg.vbsupport.ru/showthread.php?postid=417926#post417926)
how come my display looks weird?
Page generated in 1,058,278,383.14206004 seconds (100.00% PHP - 0.00% MySQL) with 23 queries.
the seconds... I used this attached file to edit.
:rambo:
d3nnis
07-16-2003, 11:48 AM
Yesterday at 11:14 PM d3nnis said this in Post #856 (https://vborg.vbsupport.ru/showthread.php?postid=417926#post417926)
how come my display looks weird?
Page generated in 1,058,278,383.14206004 seconds (100.00% PHP - 0.00% MySQL) with 23 queries.
the seconds... I used this attached file to edit.
anyone ard? my homepage and forums shows different page generation in secs...
homepage : http://www.keeptouch.net/
forums : http://forums.keeptouch.net/
do i need to modify the global file that comes with vbhome? : :ninja:
The fix is posted on the vbHL support forums... is basically a hack for vbHome.
d3nnis
07-17-2003, 01:58 AM
Today at 07:37 AM TECK said this in Post #859 (https://vborg.vbsupport.ru/showthread.php?postid=418292#post418292)
The fix is posted on the vbHL support forums... is basically a hack for vbHome.
cool will check it out in your forum. Thank TECK!
d3nnis
07-17-2003, 03:29 PM
found my fix.
http://www.teckwizards.com/forum/showthread.php?s=&threadid=364
Thanks TECK! :)
noppid
07-23-2003, 03:15 PM
06-12-03 at 02:52 PM Xelation said this in Post #847 (https://vborg.vbsupport.ru/showthread.php?postid=408149#post408149)
Hey teck, I've got a problem with a step.. its interfering with another hack.. heres the problem on this step
Find:
// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
// parses replacement vars
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg;
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);
}
while ($var=$DB_site->fetch_array($vars)) {
if ($var['findword']!="") {
$newtext=str_replace($var['findword'],$var['replaceword'],$newtext);
}
}
Replace it with:
// ###################### 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(0 => '{getmicrostats}');
$replacewords=array(0 => $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,$new text);
I have this code instead:
// ###################### Start dovars #######################
function dovars($newtext, $sendheader = 1)
{
// parses replacement vars
global $PHP_SELF, $DB_site, $replacementsetid, $gzipoutput, $gziplevel, $newpmmsg;
static $vars;
if (connection_status())
{
exit;
}
if (!is_array($vars))
{
// build an array of $vars containing find/replace values
$vars = array();
$replacements = $DB_site->query("
SELECT findword, replaceword, replacementsetid
FROM replacement
WHERE replacementsetid IN(-1, '" . intval($replacementsetid) . "')
ORDER BY replacementsetid, replacementid DESC
");
while ($replacement = $DB_site->fetch_array($replacements))
{
if ($replacement['findword'] != '')
{
$vars["$replacement[findword]"] = $replacement['replaceword'];
}
}
unset($replacement);
$DB_site->free_result($replacements);
}
if (PHPVERSION < '4.0.5' or 1)
{
// do each replacement in turn for PHP < 4.0.5
reset($vars);
while(list($find, $replace) = each($vars))
{
$newtext = str_replace($find, $replace, $newtext);
}
}
how can I fix this problem? Ive tried many different ways to fix it myself but now your my resort. Hope you can help :)
We are using 2.3.0 and have a similar issue. The code to replace is different then that specified in the hack. When we try to replace what seems the correct code we get these errors...
Warning: reset(): Passed variable is not an array or object in /functions.php on line 690
Warning: Variable passed to each() is not an array or object in /functions.php on line 691
Anyone else having issues like this?
Thanks
EDIT: The fix is here...
https://vborg.vbsupport.ru/showthread.php?s=&threadid=35811&perpage=15&display=&pagenumber=56
EVO VIII Chris
08-12-2003, 12:24 AM
Anyone got a fix for vB 2.3.2 yet? I was using it but when I upgraded to 2.3.2 it stopped working. I know they only changed a few files so the fix is probably simple, anyone know if there is one yet?
albibak
08-13-2003, 07:24 AM
Thanks for this hack, I test it now :p
mbaskett
08-27-2003, 04:42 AM
06-14-03 at 04:46 AM User_001 said this in Post #848 (https://vborg.vbsupport.ru/showthread.php?postid=408822#post408822)
has anyone even tried this on vB3?? just curious. :)
Yes, and I still haven't gotten it to work. However, we're not supposed to publicly discuss VB3 hacks until after it's released in a final version....
limey
08-29-2003, 02:48 AM
doesn't work for me here:
http://www.pokeritis.com/
or here
http://www.pokeritis.com/archive
but it works for me here:
http://www.pokeritis.com/forums/index.php
and I have installed this on another site before--and reinstalled this like 3x. The one difference is that this site is running 2.3.0 and others are 2.2.9.
Gary King
08-29-2003, 12:17 PM
You need to make a modification to make it work correctly with vBHomeLite.
limey
08-29-2003, 09:59 PM
whats the modification? I have it up and running on two other sites with vbhomelite...so I'm very interested to see which step I have missed.
StrykerContact
09-02-2003, 04:07 AM
Mine only displayes {getmicrostats} in my footer when I place it there, I have tried naming it home_microstats and just microstats for the template name, neither work. Please help.
Megadeuce
09-02-2003, 09:17 PM
HELP!
I tried to install this hack and messed up my board. I alsost managed to get back to my starting point but I get these errors:
Parse error: parse error in /home2/usasport/public_html/admin/functions.php on line 944
Fatal error: Call to undefined function: vbsetcookie() in /home2/usasport/public_html/admin/sessions.php on line 205
These are coming from my archive pages. Can anyone help?
Thanks in advance.
Gary King
09-02-2003, 09:59 PM
What's on line 944 in admin/functions.php?
chuckwk
09-11-2003, 12:39 AM
Working! I had to use the 2.3.2 updates.. thanks!
Logician
09-15-2003, 09:46 AM
eval( '$microstats = "' . gettemplate( 'microstats' ) . '";' );
+-----------------------------------------------+
| Template: home_microstats |
+-----------------------------------------------+
| Add a new template with the content:
@TECK: In your 2.3.x version the template name is wrong. The hack code is using template name "microstats" where your install instruction is asking template "home_microstats" to be created.
If you can update the instructions, people with 2.3.x version can install this great hack too.. ;)
NightWalk8r
10-01-2003, 08:42 AM
Working! I had to use the 2.3.2 updates.. thanks!
what 2.3.2 updates??? i dont see it??
I have 2.3.2 right now and i cant get it to work =(
Plz!!! can someone update the hack for us ^_^
NightWalk8r
10-03-2003, 05:10 AM
lol.........ok i got it working now.
Got a question tho.....is it better to enable gzip or disable it??
W/ Gzip
-----------------------------------------------------
Page generated in 0.08932304 seconds (79.46% PHP - 20.54% MySQL) with 18 queries.
[Debug Mode OFF] [PHP v4.3.3] [GZIP enabled - level 1] [Server Load: 27.34 » 26.23 : 21.52]
Without GZip
---------------------------------------------
Page generated in 0.20307899 seconds (34.66% PHP - 65.34% MySQL) with 18 queries.
[Debug Mode OFF] [PHP v4.3.3] [GZIP disabled] [Server Load: 26.40 » 27.01 : 23.15]
Gary King
10-03-2003, 10:52 AM
You should generally enable GZIP. By the way, that's some pretty high server loads there.
NightWalk8r
10-04-2003, 02:47 AM
really???.........could be because of my graphical template??
=/
BTW....what's the average Server load?? -_-
Gary King
10-04-2003, 01:18 PM
really???.........could be because of my graphical template??
=/
BTW....what's the average Server load?? -_-
~ 5.00?
Nice hack.
Some form of this appears to be standard with 2.3.2. Or it seems like it according to some of the code that I took out of the functions.php to install this hack. Why isn't implemented.
Gio Takahashi
10-24-2003, 08:47 PM
Nice hack installed without a problem, ::clicks install::
vBFreak
10-25-2003, 02:58 PM
Nice hack, I installed the v2.3.0 fixed version on my v2.3.2, but it seems that the Server Load doesn't run... The whole text isn't there... means that, that the server doesn't support it? What can I do to use the Server Last???
Gary King
10-25-2003, 03:44 PM
Nice hack, I installed the v2.3.0 fixed version on my v2.3.2, but it seems that the Server Load doesn't run... The whole text isn't there... means that, that the server doesn't support it? What can I do to use the Server Last???
Do the server loads show up in your admin cp?
Gio Takahashi
10-25-2003, 04:36 PM
What did you use on the template?
vBFreak
10-25-2003, 07:21 PM
I only inserted {getmicrostats} in the footer... I think that the part for the Serverlast is in the code on functions.php
Must I change there something?
Gary King
10-25-2003, 07:37 PM
Do the server loads show up in your admin cp?
Gio Takahashi
10-25-2003, 07:48 PM
vBFreak, go to your Admin CP, on the CP Home page, and see if it shows your server load average, it should appear right under your useful stuf page
Gary King
10-25-2003, 08:16 PM
P.S.
The server load only shows for *nix platforms ;)
vBFreak
10-25-2003, 11:16 PM
vBFreak, go to your Admin CP, on the CP Home page, and see if it shows your server load average, it should appear right under your useful stuf page
no, there's nothing... means that, that my server doesn't support that?
Gary King
10-25-2003, 11:41 PM
no, there's nothing... means that, that my server doesn't support that?
Could you PLEASE read my messages, I already replied twice but you don't seem to notice them :rolleyes:
adept_at_hektik
11-09-2003, 11:05 PM
Is anybody using this with 2.3.2 yet? It looks like it breaks admin/functions.php.
Gio Takahashi
11-09-2003, 11:38 PM
mine is 2.3.2 and it works fine on it.
Gary King
11-10-2003, 12:33 AM
Is anybody using this with 2.3.2 yet? It looks like it breaks admin/functions.php.
Are you using Dreamweaver by any chance as your PHP editor?
adept_at_hektik
11-10-2003, 12:43 AM
Are you using Dreamweaver by any chance as your PHP editor?
No, just straight text editors. My first attempt was using vi, next I did it in textpad.
I must have messed up patching the code into admin/functions.php, and I wonder if it was because I was confused by these instructions from vbmicrostats_vb230.txt:
| NOTE: Don't forget to remove the empty space in front of 'hovercolor'.
This shows up after the dooutput function patch, and I really don't know why there would be instructions to remove a few spaces, couldn't they have just removed the spaces from the replacement code?!
Thanks for replying, Gary and Gio. I have never applied a hack that somebody else wrote, but I have written code around vB myself. I wonder if I am missing something because of my inexperience with these types of hacks. Does anybody release patches as .diff files? It seems like that would be nice for more experienced users.
Gary King
11-10-2003, 02:25 AM
You had to manually remove the spaces, because the board used to change the {hovercolor} to the replacement set here. What's the error you're getting?
adept_at_hektik
11-10-2003, 02:42 AM
You had to manually remove the spaces, because the board used to change the {hovercolor} to the replacement set here. What's the error you're getting?
Ahh, that makes sense with the { } replacements. I got a completely blank, white screen when I uploaded my changed files. I will probably need to turn on php error reporting on to find out more about the problem. :(
ViPeR-GtS
11-14-2003, 01:32 AM
it doesnt work for the latest version... 2.3.3
Gary King
11-14-2003, 01:44 AM
it doesnt work for the latest version... 2.3.3
Doesn't work, in what way?
blakkboy
11-14-2003, 04:04 AM
what do i use to call up the microstats
{getmicrostats} or something else
when i put {getmicrostats} nuttin showed up except "{getmicrostats}"
can someone help me im running a 2.3.2 board
Rampag33
11-14-2003, 04:12 AM
what do i use to call up the microstats
{getmicrostats} or something else
when i put {getmicrostats} nuttin showed up except "{getmicrostats}"
can someone help me im running a 2.3.2 board
It works just fine on vb232 I'm running it.
Make sure you follor the instructions carefully.
Forexample removing the white space in the script as it says too.
Also remember there's 2 versions the template and non-template version.
If you have a problem using the template version remove "home_ " from the name of the template. Its a typo.
blakkboy
11-14-2003, 04:16 AM
i want to do the template one but its so complicated i dont know which part is for which
blakkboy
11-14-2003, 04:30 AM
it still doesnt work when removing home
Rampag33
11-14-2003, 06:01 AM
Did you do this part
+--------------------------------------------------------------------------+
| NOTE: Don't forget to remove the empty space in front of 'hovercolor'.
|
|
+-----------------------------------------------+
blakkboy
11-14-2003, 12:31 PM
yeah
blakkboy
11-15-2003, 05:16 AM
can someone just write down the template codes for me cuz im confused about which code goes to which option
blakkboy
11-15-2003, 08:21 AM
ok i saw the update script for 2.3.0 and since im using 2.3.2 i thought that would be the way to go....... but it still doesnt show
blakkboy
11-17-2003, 02:22 AM
edit: got this working and its very helpfull
Glitch
02-15-2004, 05:55 AM
I thought this would be one of the first to be re-written for vB3, clicks uninstall, sorry :|
Glitch
Zelda-King
02-15-2004, 08:28 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=59700" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=59700</a>
Stadler
02-15-2004, 10:22 AM
https://vborg.vbsupport.ru/showthread.php?t=59700
Thats not the same, as this hack.
e. g. it doesn't display the difference between the PHP- and MySQL-Percentage and it's Admin-only.
Boofo
02-15-2004, 10:41 AM
One has been released for vB3. I think it was on vb.nl. ;)
Pseudomizer
02-15-2004, 11:17 PM
found my fix.
http://www.teckwizards.com/forum/showthread.php?s=&threadid=364
Thanks TECK! :)
HELP !!! The domain is for sale. No more support for vbhome lite and due to this i can not get the fix for this. Does someone has this fix ? Please email me or write me a PM.
Cheers,
Pseudomizer
regarding the vb2.30 install version of this hack;
Why does it instruct you to
" NOTE: Don't forget to remove the empty space in front of 'hovercolor'."
Isnt it easier to just remove it and follow your cut and paste method?
Thanks
Gary King
02-26-2004, 01:14 AM
regarding the vb2.30 install version of this hack;
Why does it instruct you to
" NOTE: Don't forget to remove the empty space in front of 'hovercolor'."
Isnt it easier to just remove it and follow your cut and paste method?
Thanks
It's because the forums change that to something else.
ChuanSE
02-26-2004, 01:58 AM
is there one for vB3 RC4?
Hi Gary W,
im getting this error right now above the forums index page.
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/functions.php on line 1684
I went back and double checked the functions.php, db_mysql.php code and global.php code and that is fine.
and it wont let me into the admin area to add the template! it momentarily gives an error screen saying
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/functions.php on line 1684
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/functions.php on line 1684
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/functions.php on line 1684
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/global.php on line 227
So I cant even add the template! HELP!!! How can you get into the admin if it bounces you out straight away!
Pseudomizer
02-26-2004, 04:23 PM
HELP !!! The domain is for sale. No more support for vbhome lite and due to this i can not get the fix for this. Does someone has this fix ? Please email me or write me a PM.
Cheers,
Pseudomizer
No one has the fix for vbhome lite ? Any help would be appreciated.
Cheers,
Pseudomizer
Gary King
02-26-2004, 06:37 PM
No one has the fix for vbhome lite ? Any help would be appreciated.
Cheers,
Pseudomizer
Ask in the vBHomeLite thread.
Pseudomizer
02-26-2004, 07:41 PM
Ask in the vBHomeLite thread.
Thanks, but this was the first i had done. But due to no more support of the coders, no one answers there. That's the reason why i post in this thread because this add-on is perfect and i just want to add this to my start page.
But if no one can help ... :-(
Cheers,
Pseudomizer
this code does work for 2.30! Thanks TECK clicks install!
Page generated in 0.07932997 seconds (80.79% PHP - 19.21% MySQL) with 19 queries.
[Debug Mode OFF] [PHP v4.3.3] [GZIP disabled] [Server Load: 0.52 » 0.64 : 0.72]
are these stats any good???
There is a new version for VB3:
https://vborg.vbsupport.ru/showthread.php?t=62173
Gary King
03-05-2004, 01:27 AM
There is a new version for VB3:
https://vborg.vbsupport.ru/showthread.php?t=62173
Great :D
GTA3_Mafia
03-08-2004, 12:02 AM
damn i wish i didn't install this. i'm getting errors now that i cant fix..
Gary King
03-08-2004, 12:17 AM
damn i wish i didn't install this. i'm getting errors now that i cant fix..
Don't tell me you used Dreamweaver to modify the file?
GTA3_Mafia
03-08-2004, 01:58 AM
nevermind, got it working. didn't see the update file.
Kaelon
03-26-2004, 05:24 PM
Anyone else getting an outrageously high generation time in vBulletin 2.3.5?
Page generated in 1,080,326,269.21341801 seconds (100.00% PHP - 0.00% MySQL) with 25 queries.
[Debug Mode OFF] [PHP v4.1.2] [GZIP enabled - level 1] [Server Load: 0.68 ? 0.58 : 0.49]
Kaelon
03-26-2004, 05:27 PM
Just to add to this - my pages are still loading up as quickly as they were before, but it seems as if vBulletin 2.3.5 caused a bug of some sort. Any thoughts?
I didnt know there was a 2.3.5 version!
But your definitely missing something from the hack!
See how is says 100% php 0% mysql, thats your indicator that somethings wrong.
Maybe you didnt do the 2 steps in functions.php, but check the instructions again, its only 1 step you have missing or havent done properly.
Kaelon
03-27-2004, 05:16 PM
Thanks for the advice. I confirmed that the code was installed as specified in the instructions. I could only get a reasonable "page generation time" if I altered the calculation in functions.php to
$totaltime = $endtime[0] - $starttime[0];
The percentages are still all messed up, however.
i recommend starting the hack again using fresh functions.php, mysqldb.php and global.php.
Cause it does work, and as i mentioned earlier, i was getting the same errors as you.
AS frustrating as it may seem, it will come right. Good luck
Kaelon
03-28-2004, 04:51 PM
Glo - are you using 2.3.5?
im using 2.3.0 but the coding should be the same
Kaelon
03-29-2004, 12:36 AM
The upgraded differences between functions.php in 2.3.2 and 2.3.5 were significant enough, I believe, to break functionality - specifically, a couple of new procedures that measure memory usage, which I believe has broken the way that vBulletin does calculations. I'm not sure, though; honestly, I haven't spent much time trying to get the percentages right, and the quick fix I posted on page 62 worked for me.
Jonah Weiland
03-30-2004, 12:34 AM
I just installed this hack on my forums and got the oddest result:
Page generated in 1,080,612,708.69590306 seconds (100.00% PHP - 0.00% MySQL) with 26 queries.
[Debug Mode OFF][PHP v4.3.2] [GZIP enabled - level 1] [Server Load: 1.11 ? 1.59 : 1.64]
1 Million seconds? Did I install the hack wrong, or is this a sign that there's something serious wrong with my forums?
ArchMage
07-17-2004, 02:59 AM
I suppose most people are off with VB3 now. ;) But if anyone does still read this, I was wondering if there are any common problems (common hacks?) with huge MySQL % on the main forum page. I haven't added that many features to forumhome but it has 90% SQL. :surprised: Obviously it would be nice to get that down. Every other page generally has about 80% PHP. There must be some hack that is really digging into the database. (Off the top of my head, I have: a Welcome panel, a style drop-down bar, a shoutbox and a PM gauge. Maybe the shoutbox?)
I'm fairly noobish when it comes to this sort of thing, so even if you think I might be aware of simple ways to troubleshoot, feel free to mention them anyway. I'll be very grateful if I don't have to go through every edited file. ;)
Aaron Freed
08-14-2004, 06:06 PM
Hi Gary W,
im getting this error right now above the forums index page.
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/functions.php on line 1684
I went back and double checked the functions.php, db_mysql.php code and global.php code and that is fine.
and it wont let me into the admin area to add the template! it momentarily gives an error screen saying
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/functions.php on line 1684
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/functions.php on line 1684
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/functions.php on line 1684
Warning: Cannot modify header information - headers already sent by (output started at /home/glo/public_html/forums/admin/db_mysql.php:255) in /home/glo/public_html/forums/admin/global.php on line 227
So I cant even add the template! HELP!!! How can you get into the admin if it bounces you out straight away!
You're best off finding the offending templates in phpMyAdmin and deleting them, but that alone would be heavily difficult. I still haven't even figured out to get rid of those damned warnings at the top of each page my board generates, which is really upsetting me
Edit: Here's the most annoying message
Warning: Cannot modify header information - headers already sent by (output started at blahblah/forum/admin/db_mysql.php:275) in blahblah/forum/showthread.php on line 209
mashby
08-18-2004, 02:33 PM
So what's the verdict? Does this awesome hack work with 2.3.5?
mashby
08-20-2004, 11:07 PM
bump...
pdatoon
08-24-2004, 02:47 PM
Hi,
I installed the vb 2.3.0 version. I added {getmicrostats} in my footer but nothing is displayed. Does the template name is getmicrostats or home_microstats ?
Any ideas?
pdatoon
08-24-2004, 03:05 PM
Nevermind i rename the template "microstats" and it works now :)
Here are my results :
Page generated in 0.20717907 seconds (76.03% PHP - 23.97% MySQL) with 22 queries.
[Debug Mode OFF] [PHP v4.3.4] [GZIP disabled] [Server Load: 2.53 ? 2.40 : 3.05] . PHP percent page usage: 76.03% PHP MySQL percent page usage: 23.97% MySQL GZIP compression library:GZIP disabled GZIP compression level:1 your average server load: [Server Load: 2.53 ? 2.40 : 3.05]
mashby
08-26-2004, 09:38 PM
pdatoon,
Thank you for posting your reply. I did the same thing and that did the trick. Apparently this hack works just fine with 2.3.5 as long as the template name is "microstats" and not "home_microstats"
Thanks for pointing me in the right direction! :cool:
94supratt
01-14-2005, 10:11 PM
I just installed this hack on my forums and got the oddest result:
1 Million seconds? Did I install the hack wrong, or is this a sign that there's something serious wrong with my forums?
Page generated in 1,105,747,732.42824292 seconds (100.00% PHP - 0.00% MySQL) with 28 queries.
[Debug Mode OFF] [PHP v4.3.9] [GZIP enabled - level 1] [Server Load: 3.01 ? 3.11 : 2.54]
I have the same issue. Has anyone figured out why this happens?
94supratt
01-14-2005, 10:43 PM
nm got the hack working.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.