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 
Help to finish instalation of poll  XML
Forum Index » Support Forum
Author Message
son_gokou
Beginner

Joined: 24/05/2006 15:54:31
Messages: 11
Offline

Hi

I installed advanced poll by fantastico on folder poll. Second I created the database on "cpanel" "mySQL databases" in following way:

(some of the stuff are a copy of another post in this forum, and... sorry about my english)

1. Had hit "Add Db" -- Call it "mypoll". MySQL named it "songokou_mypoll" for the database name.

2. Had hit "Add User" (below) The name entered was "bobt", password "xxx"
A. Created a user.... "songokou_bobt" (that has a password "xxx")

3. Now had put "songokou_bobt" and "songokou_mypoll" in dropdown boxes (above).
A. Had hit Add user to Db
B. This tie the user "songokou_bobt" to the new database "songokou_mypoll".

Now working on Pollphp.zip,
Rename the "DB" folder to "poll"
b. Then to the "Include" folder in folder "poll".
c. Open up "'config.inc.php" in Windows

1. Change $POLLDB["dbName"] = "songokou_mypoll";
2. Leave Alone $POLLDB["host"] = "localhost"; [do not change]
3. Change $POLLDB["user"] = "songokou_bobt";
4. Change $POLLDB["pass"] = "xxx";

5. Upload whole "poll" folder to public.html in your FTP account.
6. Tree should be: \public.html\poll.
5. Now access the program in your browser with 'http://www.mydomainname.com/poll/install.php and I followed the steps, everything ok.

Now I insert the code

<?php
/* Include this before your html code */
include "./poll_cookie.php";
?>

in the begining of my php file, the one i want for the poll.

And in the place I want the poll to be I insert

<?php
include_once "/home/songokou/public_html/domainname/poll/booth.php";
echo $php_poll->poll_process(4); // x = Poll ID
?>

I upload the file and the following error appears when accessing the page:

Database Error

MySQL Error: Database error
Error number: 1046 No database selected
Date...
Ip...
Referer...
Php version: 4.4.2
Os: Linux
Server...
Server name: www.domainname.com
Script name: /index.php

Can you help me?
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Have created the database before running the install script?

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
son_gokou
Beginner

Joined: 24/05/2006 15:54:31
Messages: 11
Offline

Thanks for your reply.
You mean do this step http://www.mydomainname.com/poll/install.php ?
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

No.

You create the database then you run that script.

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
son_gokou
Beginner

Joined: 24/05/2006 15:54:31
Messages: 11
Offline

How I do that?
son_gokou
Beginner

Joined: 24/05/2006 15:54:31
Messages: 11
Offline

1. Had hit "Add Db" -- Call it "mypoll". MySQL named it "songokou_mypoll" for the database name.

2. Had hit "Add User" (below) The name entered was "bobt", password "xxx"
A. Created a user.... "songokou_bobt" (that has a password "xxx")

3. Now had put "songokou_bobt" and "songokou_mypoll" in dropdown boxes (above).
A. Had hit Add user to Db
B. This tie the user "songokou_bobt" to the new database "songokou_mypoll".


You mean doing this?
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Yes, if you have done those steps and put the correct database name in config.inc.php you should be able to run the install.php script.

Double check your config.inc.php settings.

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
son_gokou
Beginner

Joined: 24/05/2006 15:54:31
Messages: 11
Offline

I'm sorry I can't see any mistake.

Users in mypoll
songokou_bobt (Privileges: ALL PRIVILEGES)

Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:songokou_mypoll:localhost","songokou_bobt","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "songokou_bobt", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("songokou_mypoll");

Here is my MySQL database.

$POLLDB["dbname"] = "songokou_mypoll";
$POLLDB["host"] = "localhost";
$POLLDB["user"] = "songokou_bobt";
$POLLDB["pass"] = "****";
$POLLDB["class"] = "class_mysql.php";

and config.inc
....
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

To me your config looks correct as well so I'm rather confused as to why it won't work.

There's two things I can think of...

1) PHP bug
2) Incompatibility between PHP version and MySQL version

I would recommend sending an e-mail to your host about this incase they know something we don't.
Could also send Carbonize a PM since he's a damn good PHP coder.

Sorry I couldn't be of more help to you, if I think of anything I'll let you know.

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
son_gokou
Beginner

Joined: 24/05/2006 15:54:31
Messages: 11
Offline

When someone tries to help, that will be always a help Thanks dude

I don´t know if this is relevant. When I install advanced poll from fantastico, a folder named poll was automatically created. Then when I copy the stuff from pollphp.zip (only the folder poll) some files were overwritten. I don´t see any information about this in the forum so, I guess is normal. Any way I told you.

I will send a message to Carbonize

Thanks again
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Just had a thought -

from what you just said it sounds like you installed adv. poll once thru fantastico and then once using the download from this site. Maybe your accessing the wrong install of the poll ie. the one where you haven't configured the config.nc.php file. But, you have configured the config.in.php file another copy of adv. poll somewhere else that your not accessing.

If you understand that then I commend you ; ) try removing adv. poll and starting afresh using the download of this site following the instructions in my guide - not the word one the .rtf one if I remember correctly.

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Since you are on cPanel use it to install Advanced Guestbook for you. The download the config.inc.php file from the guestbooks admin folder and copy the database information from it. This way we will atleast know that the database exists.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
son_gokou
Beginner

Joined: 24/05/2006 15:54:31
Messages: 11
Offline

Auron: I removed all stuff related to adv. poll and started a fresh installation flollowing what you told me (I guess). It was pretty much the same thing I have done right? So... the same problem appeared. My host provide mysql.

Carbonize: I'm sorry, I can´t install advanced guestbook from cpanel (in CGI center right?). This means anything?
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

That is odd.
Did you create the database in say phpMyAdmin before running install.php?

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
son_gokou
Beginner

Joined: 24/05/2006 15:54:31
Messages: 11
Offline

Can you explain what you mean please?
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum