Support » Installing WordPress » t string error in wp-config.php for 2.2

  • Resolved jivyb

    (@jivyb)


    I get this error: Parse error: syntax error, unexpected T_STRING in /home/mysite/public_html/photo/wp-config.php on line 6

    I get this using the script that generates a config file, when I use a text editor manually too.

    My config file looks like this: `<?php
    // ** 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’); // 99% chance you won’t need to change this value
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    // 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 de.mo 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__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>`

Viewing 4 replies - 1 through 4 (of 4 total)
  • what you pasted is NOT what your wp-config looks like since those are the default values before editing.

    You are obviously screwing something up when you are editing it. Use notepad, its a simple text file and doesnt require anything to edit.

    Thread Starter jivyb

    (@jivyb)

    I put that in because I get the t string error with that file too. But if you want to see it edited, here it is…

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'cazppwja_wpphoto');    // The name of the database
    define('DB_USER', 'cazppwja_wpphotu');     // Your MySQL username
    define('DB_PASSWORD', '123456' // ...and password
    define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    
    // 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 de.mo 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__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

    jivyb:

    1) I hope you didn’t just paste your real password in there. =)

    2) The password line above is broken. This:
    define('DB_PASSWORD', '123456'
    should look something like this:
    define('DB_PASSWORD', '123456');

    If that doesn’t help, I just noticed something weird where localhost won’t work for me but 127.0.0.1 (localhost’s IP) will.

    Thread Starter jivyb

    (@jivyb)

    tomben–

    1) no worries–that’s all bogus info:)
    2) thanks for taking the time to read my post and give me the answer–it was the missing 😉 in the password line
    3) that’s how the file was when I unpacked the installation, so hopefully that’s not how everyone’s config file is…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘t string error in wp-config.php for 2.2’ is closed to new replies.