If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Cannot redeclare set_max_bar_length() error  XML
Forum Index » Support Forum
Author Message
Anonymous



I've just installed and tried to setup. After done, I tried to access it thru the preview in settings... Then it came out an error:

Fatal error: Cannot redeclare set_max_bar_length() in /home/poll/include/class_poll.php on line 116

I tried to put the html code thing on the webpage but it still had the same error. I didn't touch the code and the deeply settings... What is this about?
Anonymous



i got the same error, please help!
Anonymous



Hello,

I also was receiving the error you are seeing:

Fatal error: Cannot redeclare set_max_bar_length() ... on line 116

Being new to PHP, I had just installed the latest version of PHP (v4.3) as well as the Advanced Poll scripts. After reading a few posts here, I decided to download and install the prior version of PHP (v4.2) and sure enough, it solves the problem.

I don't know enough about PHP to know if the problem is a bug in the latest PHP or the Advanced Poll software, but there is definitely an incompatibility. You should be able to find an installer for PHP 4.2 on the web somewhere. Put that on and you'll be all set.

Cheers,

Michael
Anonymous



Me too. I guess nobody knows or will answer this. This must be the end of the line for this script as we know it.
Anonymous



Did anyone find out about this fault
Anonymous



Okay, here's the solution for this:

Edit class_poll.php in textfile/include.

There are two declarations of
function set_max_bar_height($max_bar_height='')

search for this term.

Comment out the second declaration!

So that you have:

// Leave this one alone
function set_max_bar_height($max_bar_height='') {
if ($max_bar_height && $max_bar_height>0) {
$this->pollvars['img_height'] = $max_bar_height;
return true;
} else {
return false;
}

// Comment out this one
/*
function set_max_bar_length($max_bar_length='') {
if ($max_bar_length && $max_bar_length>0) {
$this->pollvars['img_length'] = $max_bar_length;
}
return $this->pollvars['img_length'];
}
*/
best regards,
Thorsten
}
Anonymous



Solution is found one post above
Anonymous



Thorsten,

Thank you so much for fixing this vexing problem. Your step-by-step directions really helped. It is appreciated.
Anonymous



Hey, it works man! Thanks!
I didn't understand what you meant with "Command out".
It just means delete... (I'm Dutch)
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum