PDA

View Full Version : Database help


Weretemplar
12-23-2008, 01:54 AM
I need some database help,i keep getting this error

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'weretemplar_user'@ (using password: YES) in /www/oxyhost.com/w/e/r/weretemplar/htdocs/adoptables/adm/console.php on line 17
Cannot Connect to Database

What should i do? :(

BMR777
12-23-2008, 11:33 AM
Does your main site also give database errors, or just the Admin CP? Did you set the correct database info inside your config.php file?

Weretemplar
12-23-2008, 01:12 PM
The index.php file gives that error too

BMR777
12-23-2008, 01:14 PM
If that's the case, you've got the wrong database details in your config.php file.

Does your host use a database host other than localhost?
Are all the details correct?
Did you forget a database prefix? Some hosts you can have a database and database user named "something" but they require you to have "youraccountname_something" for the database name in the config.php file.

Brandon

Weretemplar
12-23-2008, 01:56 PM
I connected the site to the database, but i get

Notice: Undefined variable: link3 in /www/oxyhost.com/w/e/r/weretemplar/htdocs/adoptables/login.php on line 56

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/oxyhost.com/w/e/r/weretemplar/htdocs/adoptables/inc/functions.php on line 50

Notice: Undefined variable: isloggedin in /www/oxyhost.com/w/e/r/weretemplar/htdocs/adoptables/login.php on line 78

how do i fix that?

BMR777
12-23-2008, 01:57 PM
Did you run the SQL queries inside sql.txt on your database?

Weretemplar
12-23-2008, 01:59 PM
yes, i did that, and when creating a adoptable i get

Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /www/oxyhost.com/w/e/r/weretemplar/htdocs/adoptables/adm/makeadoptable.php on line 62

Im getting too many errors, is something wrong? :(

BMR777
12-23-2008, 02:01 PM
Did all the files upload correctly?

Also, try clearing your browser cookies and see if that solves the errors. Can you please post a link to your site?

Brandon

Weretemplar
12-23-2008, 02:02 PM
yes, the files uploaded correctly, here's the link

http://www.weretemplar.oxyhost.com/adoptables/index.php

BMR777
12-23-2008, 02:06 PM
Interesting. I'm not quite sure the issue is, but it may be an SQL query error.

If you PM me your site's FTP and CPanel details I can take a look at your configuration in the next few days. Due to the Christmas holiday though it'll take me a little longer than usual to get around to diagnosing the issues on your site.

Brandon

Johnathon
12-23-2008, 02:07 PM
Hey there Were. This is Johnathon. In fact, I actually started out with this code when planning adoptalicious, but it really wasn't quite complete enough for my taste, so I pretty much started over using only the basic functions.

P.s. It looks like you didn't insert the mysql "dump" included into your database. ^_~ Since account registrations and adoptions don't actually inject into the databases. Either that, or you host is blocking certain functions.

If you need any help, you have my msn already, so just contact me. ^_^

Weretemplar
12-23-2008, 02:11 PM
Hey there Were. This is Johnathon. In fact, I actually started out with this code when planning adoptalicious, but it really wasn't quite complete enough for my taste, so I pretty much started over using only the basic functions.

P.s. It looks like you didn't insert the mysql "dump" included into your database. ^_~ Since account registrations and adoptions don't actually inject into the databases. Either that, or you host is blocking certain functions.

If you need any help, you have my msn already, so just contact me. ^_^


Ok, I'll try that and i'll contact you via msn if i need more help :)
That was some VERY fast support, Thanks :D

Chasingu
12-23-2008, 06:23 PM
I also found that one error is not MySQL related...

Notice: Undefined variable: link3 in /www/oxyhost.com/w/e/r/weretemplar/htdocs/adoptables/index.php on line 111

mattalien
01-01-2009, 12:51 PM
my site is on the same host as weretemplar's and mine has the same errors:

http://www.mattalien.oxyhost.com/adoptables/index.php

BMR777
01-01-2009, 02:07 PM
my site is on the same host as weretemplar's and mine has the same errors:

http://www.mattalien.oxyhost.com/adoptables/index.php


Double check that your database details are correct. Sometimes free hosts connect to the database using a access host other than the default "localhost" or it could just be a wrong setting in the config.php.

It could also just be you've got a bad free host.

Brandon

mattalien
01-01-2009, 02:46 PM
i figured it! the old database username was, for me, mattalien_mattalien. i changed it to something else, and the site loads now!

*sighs with relief*

BMR777
01-01-2009, 02:49 PM
i figured it! the old database username was, for me, mattalien_mattalien. i changed it to something else, and the site loads now!

*sighs with relief*


It looks like it loads, but it's getting errors at the top, the same errors another user on oxyhost got.

Something about that host is messing with the script. I cannot replicate those errors on any site other than on oxyhost sites! :(

BMR777

BMR777
01-01-2009, 02:52 PM
The errors could be a result of a change your host made to php.ini.

Tell your host to turn off PHP notices in your site's PHP.INI file. The correct setting for your account should be:

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

I bet your host is using:

// Report all PHP errors
error_reporting(E_ALL);

http://us.php.net/error_reporting

mattalien
01-01-2009, 03:15 PM
great, now i can't login. i go to my site, click login, it says you've logged in, but the side bar still has the login bit. do you know why?

otherwise, what free hosting site do you recommend for this script?

BMR777
01-01-2009, 03:18 PM
It's probably issues with the host. You can find a lot of free hosts here:
http://www.freewebspace.net/forums/

BMR777

mattalien
01-01-2009, 03:19 PM
ah, thanks!