1

Topic: Need help with Pun Poll

Recently installed Pun poll, version 1.1.4_2 on a databse that did not have pun poll installed, at least to my knowledge. When I ran install_mod.php, I get: Duplicate entry 'o_polls' for key 1Unable to insert into table config. Please check your configuration and try again.. When I make a poll, I get this:  Error: Unable to save poll. When I try to access the poll, I get this:  Error: Unable to fetch poll info. When I try to get into the poll admin, i get this:  Error: Unable to fetch category/forum list. As far as I can tell, this is a db problem. Could someone help with the queries that I need to run to correct this problem? it would be greatly appriciated.

Do, or do not.

2 (edited by chacmool 2004-01-14 08:18)

Re: Need help with Pun Poll

Yes, you're right, it's most probably the database.

Can you use for example phpmyqdmin to check if the yourprefix_polls table are installed or not? It sounds like you have it installed
before, or axidently ran the install_mod twice. You could try removing the options-part of the install and see what happens.

Remove from install_mod.php:

$config = array(
    'o_polls'            => "'1'",
    'o_poll_change'    => "'1'",
    'o_poll_multi'        => "'0'",
    'p_guests_poll'    => "'0'"
);
while (list($conf_name, $conf_value) = @each($config)){
    $db->query('INSERT INTO '.$db->prefix."config (conf_name, conf_value) VALUES('$conf_name', $conf_value)")
        or exit(mysql_error().'Unable to insert into table '.$db->prefix.'config. Please check your configuration and try again. <a href="JavaScript: history.go(-1)">Go back</a>.');
}

3

Re: Need help with Pun Poll

Deleted those lines of code, now get this error:File: /home/users/zc923/public_html/punbb/install_mod.php
Line: 21

PunBB reported: Unable to add column poll to table topics
Database reported: Duplicate column name 'poll' (Errno: 1060).

Do, or do not.

4

Re: Need help with Pun Poll

Nevermind, I got it. Deleted the poll table in the sql database. Solved the problem. Thanks.

Do, or do not.

Re: Need help with Pun Poll

Okey, then it should be no problem...

If you enables debug mode (see one of the first lines in include/common.php) and try to post a poll again, what's the error message this time?

Re: Need help with Pun Poll

zc923 wrote:

Nevermind, I got it. Deleted the poll table in the sql database. Solved the problem. Thanks.

So it works now then? (Or was the solution not to use the poll at all?)

7 (edited by zc923 2004-01-14 14:25)

Re: Need help with Pun Poll

Well, It works perfectly now. All that I did was get rid of the code you told me to from the install_mod.php, and then did a little browsing in the sql databse and deleted the troublesom poll table. Then reran install_mod.php and everythng worked like a charm. Oh, chacmool, you might want to check your line references in the readme's, some of them are little off (and this is before any editing). Other then that, great mod man!

Do, or do not.

Re: Need help with Pun Poll

Great! smile

I'll do that. Probably releasing the new ver soon (not much updates, just easier to install/reinstall).