Database Error??

Discussion in 'Servers and Contol Panels' started by engineer1964, Apr 5, 2012.

  1. engineer1964

    engineer1964 hoc foro magna est

    767
    192
    +51
    I'm working on a new project and i'm, puzzled by this

    Code:
    Parse error: syntax error, unexpected T_STRING, expecting ']' in /home2/forumtop/public_html/jobs/_config/config.envs.php on line 62
    so i look at my config file and find line 62 which is

    PHP:
        define('DB_USER'$__instance['******_******']);
    i've starred out the database user name for security reasons, but basically i think that error is telling me that i have a "]" bracket???

    Can anyone see whats wrong and any help to sort this would be welcomed, PM me if you need to know more :help:
     
    1
  2. engineer1964

    engineer1964 hoc foro magna est

    767
    192
    +51
    Ok i found the problem

    PHP:
    define('DB_PORT'$__instance['3306]);
    Notice the missing apostrophe, after the 6

    Such a nightmare, now i fixed that one, another 6 have come to light, Oh well its gonna be a long Night :coffee:
     
  3. legalize

    legalize Fan

    718
    325
    +7
    That's a PHP error not a database error anyway. Usually those syntax errors throw the wrong line at you anyway, however the mistake is usually in the near vicinity haha
     
  4. webdev123

    webdev123 Participant

    59
    0
    +0
    You only need apostrophes when using letters, number can be set by themselves.