![]() |
ok.. i added the code above.
|
This hack is giving me so much trouble installing it... :-\
i'm getting the following error: Code:
Parse error: parse error in /home2/public_html/forum/admin/functions.php on line 496 I've gone over the install 20+ times. I verified that I made the correct changes and to the correct files. If I undo the changes to functions.php (copy the text to replace from the install file) everything goes back to normal. When I replace the text I get the error again. :depressed: I'm using 2.2.5 btw. |
additionally...
this is my line 351 in functions.php PHP Code:
this is my line 496 in functions.php PHP Code:
Line 494: } else { Line 495: $adminstats=""; Line 496: } |
remove $debug from the global.
then remove: Code:
if ($debug==1) { |
Quote:
That did it! No more error. :classic: It works great now. |
i'm glad. congrats... and sorry, it was my mistake that code. it will work only if you have $debug enabled in config.php
|
Just a question... is there a way to limit the decimal places of the load time?
For example, I get something like: Page generated in .2973462 seconds... Can I limit it to 2 or 3 decimal places somehow? not sure :\ |
Code:
// time format (how many digits you want to show) so it will look like: Page generated in 0.2973 seconds... |
Silly mistake! I didnt see the variable... Thanks again for all your help.
;) |
firefly, i noticed something related to your code addon for this hack. in your site, the PHP % is always smaller then the MySQL %.
the normal way is: your PHP value should always be bigger then the MySQL one (like it's supposed to be in EXPLAIN=1). everyone's page does that, except here at vB.org. just letting you know. if i'm wrong, correct me please. |
Quote:
Mine does the same thing. Take a look for yourself http://www.g20.net/forum reload as much as you wish. My average is about .30 seconds to generate the page and 35% PHP and 65% SQL. I think it may be because I have a dedicated mySQL server, its not on the localhost. :squareeyed: |
Also, I looked at my $adminstats and on average I see something like...
Page generated in 0.26241195201874 seconds with 22 queries, spending 0.18734097480774 doing MySQL queries and 0.075070977210999 doing PHP things. The SQL is taking longer to generate than PHP. Again, most likely because my VB is connecting to a db on a seperate machine. Although it is still rather fast. :classic: |
probably that's the case... :)
thanks for the info. i was just curious. however, if i do this here, at vB.org (the EXPLAIN=1) it's telling me the viceversa, what is listed in %, at the bottom of the page. |
New db_mysql.php released:
http://www.vbulletin.com/forum/showt...threadid=45395 |
i will change the file when VB226 will be oficially released. (today)
|
I like this hack. Just out of curiousity, what is an "Ideal" number to get for PHP and MySql and how do they relate?
Boy was that vague.. :D Thanks for the help, Josh |
it depends on your server. there are no ideal numbers. hope that helps.
regards, nakkid. |
Quote:
I have many hacks installed involving the first page, and now I'm round 43-45... And i'm working to something else... more! :cheeky: Btw I still have numbers like: Code:
Page generated in 0.65888 seconds Actually, is there any reason for the limit under 40 ? Shall I be afraid of arriving till 50 ? :confused: Thanks a lot. Bye |
i probably understood wrong the question. i thought he was referring at the %. :)
well, if i understood corectly from firefly, the more queries you have, the higher your server load will be. eventually, on a busy board it will bring the server to it's knees and your host will cancel your account. there are alot of people out there who have 150queries on a page, without even knowing. so i set myself a goal not to have more then 40queries on a page. even 40, on a very busy board, is dangerously high. i'm talking about boards with 300-400 users online that activly post every second. if you have 50queries, that will kill your server, if not even crashing it. the highest value will be arround 34queries, on my site. and that's the main page (vbHome full version). |
Quote:
-Tom |
nothing happens when i put {getmicrostats} in my footer template :( all i see it '' {getmicrostats} '' on my page :(
i'm obviously doing something wrong. and i have no idea what. pipsily yours. |
i'm sorry but i can't do nothing about it. please check you code. there are alot of changes so one little mistake can ruin it all. good luck.
|
Quote:
|
thanks.. :)
however the details link will not work anymore in 226. is ok, i will add the code separately. i will need the ok from some of the gurus here, to make sure the code is secure. as soon as 226 is released i will look into it. until then, FWC, can you post more details about the change? i didnt have a chance to look into it. thanks. |
I used Beyond Compare to compare my old hacked file and the new one. I just copied over the parts I thought were necessary for your hack to work. Explain and showqueries are gone now so I left all of that stuff out. I'll take a look at it and post what I added.
|
OK, it looks like I changed this:
PHP Code:
PHP Code:
|
they are unset? i didnt downloaded the new file. i wanted to wait for the 226 release. busy working on my website...
|
Yes, they are unset. I just took them out and everything seems to work fine.
|
can you edit the code above and remove them from global?
thanks. |
The update in Post 306 (above) also worked fine for me with the updated 2.2.6 db_mysql.php on vB 2.2.4
Thanks for the update ;) |
Quote:
|
The update in 306 is working for me also
|
The update for the new db_mysql is working for me, too.
However, the hack itself wasn't properly working before that, nor is it now. My percentages are completely odd: Page generated in 0.4714550 seconds (163.74% PHP / -63.74% MySQL) with 20 queries Page generated in 1.6309210 seconds (-6.54% PHP / 106.54% MySQL) with 20 queries Page generated in -0.6399480 seconds (36.72% PHP / 63.28% MySQL) with 20 queries (percentages good, generation time negative... wow) I even had 5K~ and -5K~ percentages, a few times. WHAT AM I DOING WRONG?! :'( I am using php version 4.0.4pl1 on my own computer, might this be the cause of the problem? |
hmm kurafire. wierd, it looks like a previous version bug.. this is how i updated the new db_mysql.php:
find: Code:
function query($query_string) { Code:
function query($query_string) { |
I used your new code there, but it's still giving me freakish results.
I *did* 'adopt' a small change by FireFly because without it, my forum looked like a weird rainbow-thing. He said it was something to do with my low PHP version (4.0.4pl1) - might it be that this also caused the mess-up, or is it more logical that my php-version is the problem? I tried installing new binaries of PHP but for some strange reason, the version never changed. I uninstalled and re-installed like 4 times, didn't work. :( |
i know what is it!! upgrade your php binaries!! it hapened the same thing to another user who used PHP4.01. also make sure that your file says: vbMicroStats version 1.7
if it doesnt, delete all your temp files and download it again. let me know how it goes. |
hm...anything working with the new update?
|
what do you mean anything working with the new update?
i do not understand. if you refer to the new db_mysql.php file, read above few posts... ok, i placed a link on the first post.. so is easy for everyone to get the new db_mysql.php file and the hack update. |
nakkid: I'll try, though I think I have to uninstall apache, mysql & php all at once, before it'll work. Like I said, for some weird reason, upgrading didn't do jack sh** the past 4 times :(
*makes note to do this in the afternoon* thx :) |
Hallo Nakkid,
me again. Well I found out that my provider is not using the latest php. Hes still got php 4.0.4pl. So I guess thats my problem. Ive asked him to install a newer version and he sais he will do soon but would like to know why. So sorry, but I have to ask you why. What version do I need and why? regards Tina |
All times are GMT. The time now is 11:12 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|