The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help configuring for a database

Discussion in 'Database Discussions' started by Jammer, Jun 2, 2004.

  1. Jammer

    Jammer Registered

    Joined:
    Jun 2, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    Here is your problem:
    Code:
    <ERROR Number="2" Description="Error: &quot;mysql_connect(): Access denied for user: &apos;root@localhost&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
     
  3. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  4. Jammer

    Jammer Registered

    Joined:
    Jun 2, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  5. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    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!!!
     
  6. Jammer

    Jammer Registered

    Joined:
    Jun 2, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  7. Jammer

    Jammer Registered

    Joined:
    Jun 2, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
Loading...

Share This Page