PDA

View Full Version : Cannot Connect to MySQL Error


SNK2713
06-19-2010, 04:53 PM
1. Upload all of the files inside of the "adoptables" folder to somewhere on your website, either to the root of your domain or to a subfolder.
You must use a FTP program, such as FireFTP, to upload the files.

2. CHMOD the following files and directories:

inc > config.php to 777
picuploads > gif to 777
picuploads > jpg to 777

3. Create a new MySQL database

4. Go to yoursite.com/folder/install/index.php where yoursite.com is the name of your site and folder is where you uploaded the adoptables files.
Going here will launch the automated installer which will guide you through the rest of the setup process.

I followed these instructions to install the Rusnak PHP Adoptable script on 000webhost, but when I proceeded to complete the last step I received the following error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1916460/public_html/adoptables/inc/functions.php on line 13

I figure it means that it can't find and connect to the MySQL database I created, but I'm not sure how to fix that.
Thank you in advance for any assistance.

BMR777
06-20-2010, 01:31 PM
Please try running the installer again. It looks like your database details were not properly saved to the config.php file for some reason. I know 000webhost is a bit funky sometimes.

SNK2713
06-20-2010, 07:19 PM
Okay, so when I input the database info, I receive the same errors that Wrim received:
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/a1916460/public_html/adoptables/inc/functions.php on line 183

Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/a1916460/public_html/adoptables/index.php on line 80

I tried re-uploading the zip file of the Rusnak Adoptables Script on 000webhost and noticed this error:

Warning: ftp_put() [function.ftp-put]: Can't open that file: No such file or directory in /home/manager/public_html/includes/filesystem.inc.php on line 2566

BMR777
06-20-2010, 08:40 PM
This seems to be an 000webhost issue. See here (http://www.000webhost.com/forum/customer-assistance/4516-cannot-edit-upload-delete-any-files-2.html).

SNK2713
06-20-2010, 08:42 PM
Ah okay, thanks, BMR777. I'll go ask them then.

EDIT: I contacted the HelpDesk at 000webhost, and they basically said I should use a different FTP, so I did.

I'm still getting those other two errors though. I know that I'm supposed to fill out some information somewhere, but I'm not sure what exactly.

Error 1:
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/a1916460/public_html/adoptables/inc/functions.php on line 183
// We will be getting our links from the database...

$links = "";

$query = "SELECT * FROM ".$prefix."links ORDER BY id ASC";
$result = mysql_query($query);
$num = mysql_numrows($result);

Error 2:
Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/a1916460/public_html/adoptables/index.php on line 80
$template = file_get_contents($file);