Error when installing

Discussion in 'PHP' started by jhawsh, Jan 12, 2011.

  1. #1
    Im installing a little thing on my website, but when i try to acess the install file i get this error

    Parse error: syntax error, unexpected T_STRING in /home/habboone/public_html/TwistedValues/opendb.php on line 2

    This Is My Code

    <?php
    $conn = mysql_connect (sql.byethost24.org, habboone_RARES, *******) or die ('Error connecting to mysql');
    mysql_select_db(habboone_RARES);
    ?>
    PHP:

    (I Blocked out password )

    Thanks in advance (Y)
     
    jhawsh, Jan 12, 2011 IP
  2. underground-stockholm

    underground-stockholm Guest

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need quotes around "sql.byethost24.org", "habboone_RARES" and the password.
     
    underground-stockholm, Jan 12, 2011 IP
  3. jhawsh

    jhawsh Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks very much!
    im not sure that u know this but it says
    Create systeminfo table failed
    when i try to install, is this to do with me or mysql ?
     
    jhawsh, Jan 12, 2011 IP
  4. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #4
    Assuming your database name and connection username are the same, try this code instead.
    
    <?php
    
    define('SQL_HOST','sql.byethost24.org');
    define('SQL_USER','habboone_RARES');
    define('SQL_PASS','yourpass'); // your password here
    define('SQL_DB','habboone_RARES');
    
    $conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)or die('Could not connect to MySQL database. ' . mysql_error());
    
    mysql_select_db(SQL_DB,$conn);
    
    ?>
    
    
    PHP:
    Reply back with any errors your getting...
     
    MyVodaFone, Jan 12, 2011 IP
  5. jhawsh

    jhawsh Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks but i seem to have no luck,.
    im still getting the table error

    "Create systeminfo table failed"


    If you got some spare time i could send you the link to the addon, or something,
     
    jhawsh, Jan 12, 2011 IP