Author |
Message |
25/05/2006 23:41:50
|
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?
|
|
26/05/2006 09:46:29
|
Auron
Expert
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) |
|
26/05/2006 14:54:29
|
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 ?
|
|
26/05/2006 17:39:34
|
Auron
Expert
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) |
|
26/05/2006 19:16:18
|
son_gokou
Beginner
Joined: 24/05/2006 15:54:31
Messages: 11
Offline
|
How I do that?
|
|
27/05/2006 02:50:24
|
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?
|
|
27/05/2006 11:06:59
|
Auron
Expert
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) |
|
28/05/2006 03:17:41
|
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
....
|
|
28/05/2006 03:49:06
|
Auron
Expert
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) |
|
29/05/2006 01:48:54
|
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
|
|
29/05/2006 02:05:29
|
Auron
Expert
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) |
|
29/05/2006 23:01:23
|
Carbonize
Master
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 |
|
30/05/2006 00:10:19
|
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?
|
|
30/05/2006 00:27:33
|
Auron
Expert
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) |
|
30/05/2006 00:38:39
|
son_gokou
Beginner
Joined: 24/05/2006 15:54:31
Messages: 11
Offline
|
Can you explain what you mean please?
|
|
|