PDA

View Full Version : A problem with the config.php!


Blue Icebox
02-17-2009, 05:07 PM
This is what I have right now...

<?php

// PHP Easy Adoptables Configuration File

$dbhost = 'point-file-manager.000webhost.com'; //DB Hostname
$dbuser = 'a5529740'; //DB User
$dbpass = '~password hidden~'; //DB Password
$dbname = 'Fairy Tree'; //Your database name
$dname = 'fairytree.comyr.com'; //Your domain name (No http, www or . )
$spath = '/pets'; //The folder you installed this script in, if subfolder use a slash, if root domain empty
$auser = 'Blue Icebox'; //Admin Username for Host Admin CP
$apass = 'niminim'; //Password for Host Admin CP

?>

(I have a password for the password hidden part but I'm just not showing it to bad people! ;) )

So if I do that, this comes up!


PHP Error Message

Warning: mysql_connect() [function.mysql-connect]: Host '216.108.235.104' is not allowed to connect to this MySQL server in /home/a5529740/public_html/pet/index.php on line 14

Error connecting to mysql database!

What should I do?

http://fairytree.comyr.com/pet/

What happened?

BMR777
02-17-2009, 05:20 PM
That is a host error. I hate 000webhost as nearly everyone who tries to install the script on that site has database issues.

Also, are you sure that $dbname = 'Fairy Tree'; is correct? Usually database names don't have spaces, but I could be wrong.

Blue Icebox
02-17-2009, 05:45 PM
what are databases anyways? I don't get that form! :O

BMR777
02-17-2009, 05:47 PM
MySQL databases is where everything about your adoptables and users is stored, such as usernames, passwords, adoptable names, etc. :)

Blue Icebox
02-17-2009, 06:03 PM
okay, then how are you supposed to fill out...

$dbhost = 'point-file-manager.000webhost.com';
$dbuser = 'a5529740';
$dbpass = '~password hidden~';
$dbname = 'Fairy Tree';

?

What's a database name?
Whats a database user?
What is a database password?
What is a database host?

~~Can you give me a suggestion to what host should I use?~~

:D[hr]
Do you say...

http://www.afmu.com/

do you think that works well?

BMR777
02-17-2009, 06:04 PM
You get these settings from your web host when you make a new database in their control panel. 000webhost is tricky, so contact them as they are the only ones who seem to know which value to use for $dbhost as it varies based on the server they have your account on. :)

Blue Icebox
02-17-2009, 06:14 PM
would

Domain fairytree.comyr.com
Username a5529740
Password * hidden * (show)
Disk Usage 1.2 / 1500.0 MB
Bandwidth 100000 MB (100GB)
Home Root /home/a5529740
Server Name server24.000webhost.com
IP Address 216.108.235.104
Apache ver. 2.2.10 (Unix)
PHP version 5.2.*
MySQL ver. 5.0.51-community
Activated On 2009-02-13 00:45
Status Active

give any help?

BMR777
02-17-2009, 06:17 PM
Again, you have to ask 000webhost for the correct value for $dbhost. Nothing I can do until you get the correct value for the server you are on.

Blue Icebox
02-17-2009, 06:23 PM
oh I ~THINK~ I've found a solution without contacting them...
I found a place where you can ~CREATE~ your MySql name, ect...![hr]
$mysql_host = "mysql6.000webhost.com";
$mysql_database = "a5529740_FT";
$mysql_user = "a5529740_BI";
$mysql_password = "~HIDDENPASSWORD!~";

THATS WHAT I GOT! :D[hr]
Wait no... http://fairytree.comyr.com/pet/index.php look! Too many problems! What should I do?

BMR777
02-17-2009, 06:37 PM
Did you run the SQL queries inside of sql.txt on your database using PHPMyAdmin? :)

Blue Icebox
02-17-2009, 06:43 PM
what?[hr]
you mean http://fairytree.comyr.com/pet/adm/?

BMR777
02-17-2009, 06:45 PM
You need to use PHPMyAdmin in your host's control panel to insert the SQL queries inside of sql.txt onto your database. Open PHPMyAdmin from your host's control panel and click on your database on the list to the left. Then once the page loads click on the SQL icon at the top left in the row of icons and paste the contents of sql.txt into the window and submit it. :)

Blue Icebox
02-17-2009, 07:49 PM
You need to use PHPMyAdmin in your host's control panel to insert the SQL queries inside of sql.txt onto your database. Open PHPMyAdmin from your host's control panel and click on your database on the list to the left. Then once the page loads click on the SQL icon at the top left in the row of icons and paste the contents of sql.txt into the window and submit it. :)


What is PHPMyAdmin? How do you get one?[hr]
do you mean the one that has:

CREATE TABLE article_content (page varchar(20), title varchar(75), date varchar(15), content varchar(15000));
INSERT INTO article_content (page, title, date, content) VALUES ('index', 'This is the index page', 'Jan-10-1999', 'This is a sample article. All of this text you can change in the script admin control panel.');
INSERT INTO article_content (page, title, date, content) VALUES ('tos', 'This is the Terms of Service Page', 'Jan-10-1999', 'Put your Terms of Service and legal documents here. All of this text you can change in the script admin control panel.');
INSERT INTO article_content (page, title, date, content) VALUES ('extra', 'This is the extra page.', 'Jan-10-1999', 'This is an extra page you can edit in your Admin CP.');

CREATE TABLE users (uid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, username varchar(20) UNIQUE, password varchar(100), email varchar(60), level varchar(60));

CREATE TABLE adoptables (uid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(30), imageurl varchar(300), memberlevel varchar(40), description varchar(300));

CREATE TABLE owned_adoptables (uid INT NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY, name varchar(30) , imageurl varchar(100), currentlevel int(10), totalclicks int(10), owner varchar(40), type varchar(30), code varchar(50));

CREATE TABLE adoptable_rankimages (name varchar(30) UNIQUE, l1i varchar(300), l2i varchar(300) , l3i varchar(300), l4i varchar(300), l5i varchar(300) , l6i varchar(300), l7i varchar(300), l8i varchar(300));

CREATE TABLE vote_voters (date varchar(30), username varchar(50), ip varchar(50), adoptableid int(10));

?

BMR777
02-17-2009, 07:54 PM
Yeah, you would paste that into PHPMyAdmin. The PHPMyAdmin is something you can access in your HOST's control panel. :)

Blue Icebox
02-17-2009, 08:05 PM
Oh, YAY!