View Full Version : [fixed] 2.2.0 Error with Thread Ratings and Multiple Polls
CountZero
Thu 1st Nov '01, 12:41am
Hey there,
I just went through the upgrade this evening from 2.0.3 to 2.2.0 and everything seems to work fine Except for one odd little error that I get..
If I post a Poll and allow Multiple responses to the Poll and then go back and Rate the Thread I get the following error at the top of the page..
Warning: Wrong parameter count for round() in /home/procar/professionalcar-www/forums/showthread.php on line 236
It displays ABOVE the graphics for the sytem and the menu bar.. It doesnt seem to stop any functions, but it shows up every time I create a Multiple answer poll and then rate it..
Is there a possibility of a corrupted file? And is it safe to reupload the files from the Upgrade package in case there was corruption? (I dont want to upload files if its going to cause problems. I'm not sure if the upgradexx.php keys files to the installation)
Any suggestions would be great. :)
Other than this little quirk, I really, really like 2.2.0.. It seems to run really stable right out of the box..
Thanks in advance,
Dean N
CountZero
Thu 1st Nov '01, 10:57am
I've gone back and done some additional checking and the same error shows on ANY Thread on our forums that has a Poll AND has been rated.. :)
I dont have any hacks in the system so I'm pretty sure it isnt something that I put in wrong. And I followed the upgrade procedure to the letter.. (The Automated Upgrade system is a REALLY nice feature BTW, saves time and prevents a decent amount of mistakes compared to manual upgrades)
For Reference, here is a Link to a Thread showing the error:
http://208.56.166.104/forums/showthread.php?threadid=94
And a Thread, not yet rated..
http://208.56.166.104/forums/showthread.php?threadid=159
Thanks for any directions you could point me in..
Dean N
PCS Webmaster/Forum Admin
CountZero
Thu 1st Nov '01, 7:05pm
It seems to be tied to the Rating system. I tried to Rate a New poll and got the same error..
Any suggestions?
Thanks in advance,
Dean N
Freddie Bingham
Thu 1st Nov '01, 7:53pm
Yes the error in round() would be from the rating system. I havent' had time to actually look at what the problem with the syntax is. Can you give me your server specs, php3?
CountZero
Thu 1st Nov '01, 8:16pm
Thanks for the Reply..
I just discovered that we are living on a server with outdated PHP on it. (3.0.12) I've been told by the host folks that they will be moving us to a PHP4 machine shortly. (Hopefully today, if they get their transfer script working properly) The new machine should be running at least php 4.0.4.p1 if its anything like the Other domain I have hosted there.. I'm by no means an expert which is why I'm here asking for help.. <G> Could the older version of PHP be causing the problems? Should we wait to go much further until AFTER they get me moved to the updated box?
(I would hate to have you waste time digging through code if it IS a problem with the older version of PHP)
At any rate, the current system specs from the info page are rather brief:
System: Linux 2.2.13 #2 Wed Jan 26 13:44:49 EST 2000 i686 unknown
MySql: 3.22.27
Apache Version: Apache/1.3.9
Hopefully the move to the New machine with the more recent PHP will stabilize things.. (At the very least we will have Zlib installed so we can use Gzip on the boards) As soon as we get moved to the new machine, I'll test the threads again and update you here.. I'll also get info on the new server as soon as I know it for sure. (Just in case the problem doesnt go away with the new version of PHP.)
Thanks again for your assistance, and if there is any additional info you need, Please let me know and I'll dig it up.. I
Dean N
Freddie Bingham
Thu 1st Nov '01, 8:20pm
No it needs to work on that version of php so it will be fixed shortly.
CountZero
Thu 1st Nov '01, 10:49pm
Cool deal.. :) I'm just learning PHP/MySQL, so I will gladly defer to your expertise. I'll be more than happy to try anything that will help you find and squish this error message. I'm at your disposal on this one..
Thanks again,
Dean N
Dez_U
Sat 3rd Nov '01, 6:50am
I seem to have the same problem.
Warning: Wrong parameter count for round() in /usr/home/kdh567/public_html/chat/showthread.php3 on line 236
but it has only happened on one thread so far and not a poll.
its on my www.refrigeration-engineer.com site
http://www.refrigeration-engineer.com/chat/showthread.php3?threadid=419
Dez_U
Sat 3rd Nov '01, 6:58am
I just rated a thread on my www.clanram.com board and it is the same problem :(
I am on a php3 server
Freddie Bingham
Sat 3rd Nov '01, 1:47pm
Find on line 236 in showthread.php:
$thread['voteavg'] = round($thread['votetotal'] / $thread['votenum'],2);Replace with:
$thread['voteavg'] = sprintf('%.2f', ($thread['votetotal'] / $thread['votenum']));
Dez_U
Sat 3rd Nov '01, 2:07pm
worked a treat, thanks Freddie :D
CountZero
Sat 3rd Nov '01, 5:41pm
Worked Perfect!
Again, stellar customer Service! Just one of the many reasons I'm running vBulletin.
Thanks Freddie!
Dean N
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights