Little help with installing php script

Discussion in 'PHP' started by scriptsy26, May 1, 2010.

  1. #1
    If you go to my website you see a db failure. www.winprizesonline.info

    Can someone can explain to me where the failure is and what am i doing wrong

    Thanks
     
    scriptsy26, May 1, 2010 IP
  2. n3r0x

    n3r0x Well-Known Member

    Messages:
    257
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    120
    #2
    This is what mysql.com says about 10061

     
    n3r0x, May 1, 2010 IP
  3. lorkan

    lorkan Peon

    Messages:
    20
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi!

    You should also know how the mysql_pconnect() function works in order to understand what fault might have occured:

    The mysql_pconnect() function opens a persistent MySQL connection.

    This function returns the connection on success, or FALSE and an error on failure. You can hide the error output by adding an '@' in front of the function name.

    mysql_pconnect() is much like mysql_connect(), but with two major differences:

    This function will try to find a connection that's already open, with the same host, username and password. If one is found, this will be returned instead of opening a new connection
    The connection will not be closed when the execution of the script ends (mysql_close() will not close connection opened by mysql_pconnect()). It will stay open for future use...

    Do you know if you already have an open connection to the db? Are you sure you have configured the db connection setting properly?

    Perhaps you should post the code on the site or tell us more about the circumstances...
     
    lorkan, May 1, 2010 IP
  4. scriptsy26

    scriptsy26 Active Member

    Messages:
    274
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #4
    Thanks for your listings, maybe i have set up the the .config the wrong way. it must be a simple script but it keeps bugging me with failure, i have set up another db but still no results.
    Can someone help me with setting this up for me? we can discuss rewards. Let me know.
     
    scriptsy26, May 2, 2010 IP
  5. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #5
    If you haven't noticed godaddy doesn't use localhost, after you create a db wait a while and go back to your db listings click the edit icon and that will reveal your connection settings
     
    MyVodaFone, May 2, 2010 IP
  6. scriptsy26

    scriptsy26 Active Member

    Messages:
    274
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #6
    yes thanks for that, but the problem is not solved haha but the error is changed now, a new massages is popping up.
    Error in Selection Query
    select winner_url from tbl_adminsettings
    No database selected

    anybody can help me with this, is this a error in the file i imported into my database?
     
    scriptsy26, May 3, 2010 IP
  7. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #7
    Please show us your config file but remove your password and also when you say you imported a file, this was a .sql file correct ? and when you visit your database page, the phpmyadmin page can you see a table called adminsettings ?
     
    MyVodaFone, May 3, 2010 IP
  8. scriptsy26

    scriptsy26 Active Member

    Messages:
    274
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #8
    <?php
    /*$config["SiteClassPath"]=$_SERVER['DOCUMENT_ROOT']."/lottery/includes/classes/";
    $config["SiteTemplatesPath"]= "templates/";
    $config["DBHostName"] = 'svenwarmerdam.db.6070456.hostedresource.com';
    $config["DBUserName"] = 'server';
    $config["DBPassword"] = 'password';
    $config["DBName"] = 'svenwarmerdam';
    $config["sitepath"]='/lottery/'; */


    $config["SiteClassPath"]=$_SERVER['DOCUMENT_ROOT']."/includes/classes/";
    $config["SiteTemplatesPath"]= "templates/";
    $config["DBHostName"] = 'svenwarmerdam.db.6070456.hostedresource.com';
    $config["DBUserName"] = 'server';
    $config["DBPassword"] = 'password';
    $config["DBName"] = 'svenwarmerdam';
    ?>

    Yes i have imported the .sql file and in my datase page there is a file called adminsettings.

    So any idea's

    i m working on it so let see if the changes i made could have some effect.
     
    scriptsy26, May 4, 2010 IP
  9. scriptsy26

    scriptsy26 Active Member

    Messages:
    274
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #9
    I have switched db usersname and dbname and nowthe error is this

    Error in Selection Query
    select winner_url from tbl_adminsettings
    No database selected

    if i switch back then another error occured.

    one question, if i look in the phpadmin i see two files, one was already there, i do not know if it has any help deleted this.
     
    scriptsy26, May 4, 2010 IP
  10. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #10
    Just try reinstalling the Script!
    Make sure that the the table you're requesting is available in your db or not :)
     
    roopajyothi, May 4, 2010 IP