Need help with PHP connecting to mysql database

Discussion in 'PHP' started by egk, Nov 15, 2007.

  1. #1
    I have a script that I purchased that I am trying to install. The install requires me to modify the /includes/configure.php file by replacing all of the CHANGEME entries with my information.

    Below is how the configure.php looks:

    // add your database and website details to the variables below
    define('DB_SERVER_USERNAME', 'CHANGEME');
    // your username that you use to log into your web server
    define('DB_SERVER_PASSWORD', 'CHANGEME');
    // your password that you use to log into your web server
    define('DB_DATABASE', 'CHANGEME');
    // replace username with your web server username
    define('DIR_FS_CATALOG', '/home/CHANGEME/public_html/');
    define('HTTP_SERVER', 'http://www.CHANGEME.co.uk');
    define('HTTP_COOKIE_DOMAIN', '.CHANGEME.co.uk');
    // do not include the www

    I changed all the CHANGEMEs to include my information but as you can see it does not ask for a DB_SERVER.

    Farther down in the file there is the following:

    // you do not need to change anything below
    define('DB_SERVER', 'localhost');

    Even though it says you do not need to change anything below, I replaced the localhost with the information for my mysql server. However the script continues to use localhost when trying to connect to the database.

    I guess my question is can someone look at the script with me and help me find why or where it is still calling localhost for the DB_SERVER?
     
    egk, Nov 15, 2007 IP
  2. foreststone

    foreststone Peon

    Messages:
    1,355
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    if you already built a database in your server and make sure the database already active, should be ok
     
    foreststone, Nov 15, 2007 IP
  3. egk

    egk Peon

    Messages:
    451
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes the database is built and active. However it is odd that it still doesn't work.
    When I try to access the script through a web browser it gives me the following message:

    Warning: mysql_pconnect(): Access denied for user 'dbusername'@'servername (which is localhost)' (using password: YES) in /home/path/html/includes/functions/database.php on line 10
    Unable to connect to database server!

    One thing that I did notice, at the bottom of the configure.php file is a:
    define('USE_PCONNECT', 'false');

    Could this have anything to do with the problem?
     
    egk, Nov 15, 2007 IP