Support » Plugins » Advanced Poll 2.03

  • Resolved Palindrome


    Has anyone successfully embedded a poll from Advanced Poll 2.03 in their sidebar? When I attempt to embed a poll in my sidebar, the MySQL connection breaks for some reason. When I create a PHP page by itself it does not. Anyone have any ideas where to start?

    This is the code I’m trying to embed in my sidebar:

    // Important! You have to include it before your html code
    include_once “/home/willtoex/public_html/polls/poll_cookie.php”;

    include_once “/home/willtoex/public_html/polls/booth.php”;
    echo $php_poll->poll_process(4);

    The error message is:

    Warning: mysql_connect(): Access denied for user: ‘willtoex@localhost’ (Using password: NO) in

    MySQL Error : Connection Error
    Error Number: 0
    Date : Mon, May 23, 2005 13:16:09
    IP :
    Browser : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
    Referer :
    PHP Version : 4.3.10
    OS : Linux
    Server : Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/ mod_ssl/2.8.22 OpenSSL/0.9.7a PHP-CGI/0.1b
    Server Name :
    Script Name : /index.php

    Any tips would be appreciated.

Viewing 13 replies - 1 through 13 (of 13 total)
  • By “include before html code”, doesn’t it mean AHEAD of the <html> tag?

    Or maybe not – I’ve seen it in something somewhere later in the page…. let me look some….

    vkaryl, I did add the include before code snippet to the very beginning of the sidebar.

    It the second portion of code that, no matter where I insert it into the page, causes problems.

    Well, hmm. The only stuff I can find is done in the php files themselves for various plugins. So I really haven’t a clue, not being a php code-jockey of any sort! Sorry!

    Only other thing might be to put the required include line in the header.php?

    I think I’m going to need to study some PHP.

    The HTML header isn’t in sidebar.php so putting it there wouldn’t really help. I tried putting it in index.php in themes/default/ as well as wp-blog-header.php – no difference.

    I don’t think the problem is with where include_once “…booth.php”

    Using output buffering will solve your problem.

    Warning: mysql_connect(): Access denied for user: ‘willtoex@localhost’ (Using password: NO) in

    This error means the poll’s database information has not been set in the poll/include/ file. It needs the following information:

    $POLLDB[“dbName”] = “database name”;
    $POLLDB[“host”] = “localhost”;
    $POLLDB[“user”] = “database username”;
    $POLLDB[“pass”] = “database user’s password”;
    $POLLDB[“class”] = “class_mysql.php”;

    I have everything well configured on the file and still get the same rror he does! :S

    take the info from the config sheet and place it in that file where it needs the info.. make sure the paths are right

    “database name”; <– repalce “database name” with your database name
    “database username”; <– repalce “user” with your database username
    “database user’s password”; <– replace “pass” with your database password
    “class_mysql.php”; <– not sure what that is.. I would assume it needs the path to where this file is?

    Hey. I’m the author of an alternate WordPress polling option that you’ll find easier to install.

    I humbly suggest you try Democracy and forget about Advanced Poll.

    You should try democratie based on the Ajax polling system.




    I’ve been using Democracy for a while on my site, but I gotta say, it’s pretty weak. I’m only using it because I can’t find any other solution.

    Please take a look at other polling solutions on other websites and try to catch up with the times.



    Thanks, I’ve switched to Democracy and it’s way better than I ever hoped for from a WordPress plugin. Awesome job.

    Does exactly what I want. Don’t consider it weak at all. Simple, easy install and fits into my sidebar.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Advanced Poll 2.03’ is closed to new replies.