Need help configuring for a database

Jammer

Registered
Jun 2, 2004
4
0
151
I have created a page on my local machine (localhost) using Adobe GoLive and PHP. Everything works great when I let the local server process. Page displays fine. I just recently signed up for service with Ace-Net and began uploading my files. I created the DB with PHPAdmin and populated the tables using the script from MySQLDump.

However, the page does not display when I access it:

http:\\www.thesportslair.com\MemberRides.php

I need to configure my page for the datasource but can not find any documentation on how to do this. Can someone lend a hand?

Thanks,
James
 

mickalo

Well-Known Member
Apr 16, 2002
782
5
318
N.W. Iowa
Here is your problem:
Code:
<ERROR Number="2" Description="Error: &quot;mysql_connect(): Access denied for user: &apos;[email protected]&apos; (Using password: YES)&quot; on line 511 of /home/jammer/public_html/config/include/mysql.runtime6.php
you need to configure your PHP script or what ever connects to the MySQL database, with the proper parameters to successfully connect to the database that it's attempting to use, IE.. username, password, database, host,...IE

Mickalo
 

bamasbest

Well-Known Member
Jan 10, 2004
531
0
166
You need to edit the file:

config/include/mysql.runtime6.php

to reflect database name, user name and password that the server uses.

Do this with a text processor and upload using text mode.
 

Jammer

Registered
Jun 2, 2004
4
0
151
wow! now where in the world would it add the code. No offense but I am very much wet behind the ears when it comes to PHP. I just opened the file to look at it and talk about a foreign language. I did a search on user and on password but nothing comes up. Couldn't find a spot to add that info. Can ya point me in the right direction?
 

bamasbest

Well-Known Member
Jan 10, 2004
531
0
166
My bad,

you probably need to edit config/datasources/jammer_thesportslair.mysql.sbs

btw - this file is world readable and you need to do something to secure it or you'll open up some big security holes!!!
 

Jammer

Registered
Jun 2, 2004
4
0
151
well...unfortunately....my page is still not displaying. I have modified the .sbs file but still getting a blank page. Is there any type of error checking I can do to find this? You guys have been a big help so far. Hopefully this will get figured out while I still have some hair left.
 

Jammer

Registered
Jun 2, 2004
4
0
151
Gentlemen, I want to thank you greatly for your assistance...I have worked through the issue and can happily say that my page is now displaying quite properly. Here is the correct coding I needed:

$GL_mysql_dsnames_result = $r;
if (isset($r) && $r != null && is_array($r)) {
$link_id = mysql_connect(@$r["<host here>"], @$r["<user>"], @$r["<password>"]) or
die('ERROR: Could not connect to host [' . @$r["<host here>"] . '].');

The double quotes was the kicker. I process on my localhost with single quotes but the server is looking for double. Not sure why but that got her.

Thanks once again.