SitePoint Sponsor

User Tag List

Results 1 to 17 of 17

Thread: Help Me Pleasee

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help Me Pleasee

    I have this error and i dont know what to do....
    -------------------------------------------------------------------------

    Warning: mysql_connect(): Unknown MySQL Server Host '%SQL_HOST%' (3) in /hsphere/local/home/model9k/humanart.net/pedro/xcart/include/func.php on line 43

    Warning: mysql_select_db(): Access denied for user: 'httpd@localhost' (Using password: NO) in /hsphere/local/home/model9k/humanart.net/pedro/xcart/include/func.php on line 47

    Warning: mysql_select_db(): A link to the server could not be established in /hsphere/local/home/model9k/humanart.net/pedro/xcart/include/func.php on line 47
    Could not connect to SQL db
    --------------------------------------------------------------------------

    Can anyone help me ill give u more expecific details of it

  2. #2
    Accredited Master scotty2260's Avatar
    Join Date
    Apr 2004
    Location
    California
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    please post lines 43-48 of the script to look at...

    It appears that you have not entered the correct username, password, or db name.
    Scott

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2005
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something is wrong with the db connection script
    You might nit have permission to access the db
    Post the connection script

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    starts on 42 and finishes on 48 on func.php

    function db_connect($sql_host, $sql_user, $sql_password) {
    return mysql_connect($sql_host, $sql_user, $sql_password);
    }

    function db_select_db($sql_db) {
    return mysql_select_db($sql_db) || die("Could not connect to SQL db");
    }

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    scotty2260 i have resolved the permision problem u helped me yesterday....thank u very much

  6. #6
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    153 Post(s)
    Tagged
    3 Thread(s)
    post where the variables are registered ie where $sql_host is registered

    Cheers
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  7. #7
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ
    post where the variables are registered ie where $sql_host is registered

    Cheers
    yes she is...those eyes will kill many hearts...

  8. #8
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    spikeZ i didnt get it....

    post where the variables are registered ie where $sql_host is registered

    what u mean??

  9. #9
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    153 Post(s)
    Tagged
    3 Thread(s)
    thanks for the nice comment! I will tell her when she's older!

    $sql_host is a variable and so it must have been registeres somewhere in the connection script.

    Something like....
    $sql_host = 'mysite.com';

    What is registered in your variable?

    The reason I ask is that you can most likely ignore the last 2 errors as they are generated as a result of the first one.

    Cheers

    Mike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  10. #10
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    spike tha variable names are in config.php right?

  11. #11
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This ones SpikeZ
    ??

    $sql_host ='%SQL_HOST%';
    $sql_user ='%SQL_USER%';
    $sql_db ='%SQL_DB%';
    $sql_password ='%SQL_PASSWORD%';

  12. #12
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    153 Post(s)
    Tagged
    3 Thread(s)
    yup, that's them!

    Change the $sql_host for the host you are using, the password for your own and the db for the database name.

    Is this part of a program or app such as a vBulletin or something?
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  13. #13
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    www.humanart.net/pedro/xcart...its a script but how can i see the host im using? its this www.humanart.net? and the other variables?? i have a folder with some sql files in the same script

  14. #14
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    153 Post(s)
    Tagged
    3 Thread(s)
    OK, you need to find out where the database is being hosted.
    Is it on humanart or is it remote....
    What is the username and password to access the database....
    Has a database been set up?

    What I think you have is the default config variables from the script that you have to change to get it to work. See if you can get the answers to the above questions and get back to me

    Cheers
    Mike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  15. #15
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    www.humanart.net/pedro/xcart and click on ENTER THE STORE and see the error pls...

  16. #16
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think its because the database its not created....but can u tell me why this query have error??

    CREATE TABLE xcart_categories(

    categoryid int( 11 ) NOT NULL AUTO_INCREMENT ,
    image_x int( 11 ) NOT NULL default '0',
    image_y int( 11 ) NOT NULL default '0',
    category varchar( 255 ) NOT NULL default '',
    description text NOT NULL ,
    meta_descr varchar( 255 ) NOT NULL default '',
    avail char( 1 ) NOT NULL default 'Y',
    views_stats int( 11 ) NOT NULL default '0',
    order_by int( 11 ) NOT NULL default '0',
    membership varchar( 32 ) NOT NULL default '',
    threshold_bestsellers int( 11 ) NOT NULL default '1',
    product_count int( 11 ) NOT NULL default '0',
    meta_keywords varchar( 255 ) NOT NULL default '',
    PRIMARY KEY ( categoryid ) ,
    UNIQUE KEY category( category ) ,
    KEY order_by( order_by )
    ) TYPE = MYISAM

  17. #17
    Maniacally depressed robot poncho's Avatar
    Join Date
    Dec 2004
    Location
    Belfast, N.Ireland
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are just starting with xcart, then read and follow the instructions on installing it, "INSTALL" in the xcart directory. There is an install wizard "install.php" but you must first change file permissions on several files.

    In short, Read The (F) Manual.
    Perfecting the art of breaking stuff.
    Check 'em: CakePHP | TextMate


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •