Support » Installing WordPress » Problem with T_STRING !!!!

  • Resolved ady20


    hello guys, I wanted to install my own blog(2.15) but can not be set the config.php file.
    I uploaded files, I got my information from the data in wp-config.php, I gave permission to 0777 files. but gives me an error and not know what the cause is:
    Parse error: syntax error, unexpected T_STRING in / home / www / free / XXXX / XXXXXXX / wp-config.php on line 4
    I wrote the name of the database, username, password, I checked a few times, it connects to the database, but it gives me the error and i dont know what would be the case.

    This is the source code of my 4 line:

    mysql select db1(“best_video_uv_ro01”);

    Do you have any idea? what is rong ?

    Sorry for my bad english.

Viewing 8 replies - 1 through 8 (of 8 total)
  • No, line #4 in the CORRECTLY edited wp-config.php file can NOT be that.
    It is not about source code!
    It is about what you did in the wp-config.php file.

    Review the instructions:

    Well, trust me i have review this intructions for a several time,
    but nothing, the same error.
    This is my config.php file:

    // ** MySQL settings ** //
    $dbh = mysql_connect(“hostname”, “username”, “<PASSWORD HERE>”) or die (“message”);
    mysql select db1(“databasename”);

    // Change SECRET_KEY to a unique phrase. You won’t have to remember it later,
    // so make it long and complicated. You can visit
    // to get a phrase generated for you, or just make something up.
    define(‘SECRET_KEY’, ‘*******’); // Change this to a unique phrase.

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-content/languages.
    // For example, install to wp-content/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* That’s all, stop editing! Happy blogging. */

    define(‘ABSPATH’, dirname(__FILE__).’/’);

    I rename the file wp-config-sample.php to wp-config.php.

    This is absolutely wrong:

    $dbh = mysql_connect("hostname", "username", "<PASSWORD HERE>") or die ("message");
    mysql select db1("databasename");

    I don’t know how did you “review” the instructions and what did you see because it says clearly what to do:

    // ** MySQL settings ** //
    define('DB_NAME', 'putyourdbnamehere');    // The name of the database
    define('DB_USER', 'usernamehere');     // Your MySQL username
    define('DB_PASSWORD', 'yourpasswordhere'); // ...and password
    define('DB_HOST', 'localhost');    //

    Just stop trying to be smarter! Do it exactly as it says:
    Do NOT change anything, just type in your username where it says “usernamehere” etc. – do NOT touch anything else!

    Well, now i do exactly as you say,but surpise: Error establishing a database connection. i checked and double checked the config.php,the date are corectly write to this file.
    I forgot to tell somethig:i used a free hosting, could be this a problem ??

    // ** MySQL settings ** //
    define('DB_NAME', 'databasename');    // The name of the database
    define('DB_USER', 'username');     // Your MySQL username
    define('DB_PASSWORD', 'PASSWORD'); // ...and password
    define('DB_HOST', 'hostname');    //

    databasename, username, PASSWORD, hostname – are only placeholders.
    But you will have to replace those “placeholders” with the REAL data from your own host!

    Of course i have replace whit my real data,but whit no succes.She give the same message :Error establishing a database connection.
    I have cheked,double checked and triple checked my data to be write corectly,but nothing….the same error. i don’t know what to do….

    Well, despite what you think… in 99.99% of the cases it is a user error: a space, a missing quote [‘], wrong quote (when using bad editors) and so on.

    Thank’s alot for advice , i have resolve the problem.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problem with T_STRING !!!!’ is closed to new replies.