• I am trying to install WordPress on my domain, but I’m receiving this message:
    Parse error: parse error, unexpected T_VARIABLE in /mydomain/wordpress/wp-config.php on line 24
    line 24 is my db password, but it is correct.
    Does one enter the information of host, db, and password twice?, both at the top, right under
    // ** MySQL settings ** //
    and then again right below:
    /* Stop editing */
    Can someone point me to the correct setup of the wp-config file.
    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • You’ve probably missed a ; or a ‘ or a ) on that line.

    Thread Starter toplars

    (@toplars)

    I’ll try again with a new wp-config file!
    Thanks!

    No need – just carefully compare each line to a default, or to another line in your config file.

    Thread Starter toplars

    (@toplars)

    Yeah, I have done that now, but I don’t see what’s wrong. I’ve re-entered the info and nothing changes after uploading the file to my server.
    Where can I find a default? sorry for asking such banal questions, but I’m new to this template.

    define('DB_NAME', 'xxxx');
    define('DB_USER', 'xxx');
    define('DB_PASSWORD', 'xx');
    define('DB_HOST', 'localhost');

    Moderator James Huff

    (@macmanx)

    Toplars, to answer your question at the top, you don’t enter the data twice. Just once in the fields at the top of the file. The best thing to do is to re-download and start with a fresh wp-config.php file.

    Thread Starter toplars

    (@toplars)

    Thanks, that got me to the following problem:
    “Error establishing a database connection! This probably means that the connection information in your wp-config.php file is incorrect. Double check it and try again.
    * Are you sure you have the correct user/password?
    * Are you sure that you have typed the correct hostname?
    * Are you sure that the database server is running?”
    What information do I out in this section, if any?:
    $server = DB_HOST;
    $loginsql = DB_USER;
    $passsql = DB_PASSWORD;
    $base = DB_NAME;
    I’ve put in: mysql host server in the first line, but left the others as they are here. Should I duplicat the info from further up in the script here?

    None – you don’t edit anything at all below the part that says Stop Editing.
    The order of the entered info is not important, but somewhere an error has crept in. Check for extra spaces in names ?

    Thread Starter toplars

    (@toplars)

    Hi again, and thanks for the prompt info. Good to know that there’s someone out there.
    I’m now in, but I had to set the local host to my local provider’s name.
    That means I’m within the one percent that has to change this value. Could this then be the case for more than just me, ie. this occuring more than onece in a hundred?
    Check out my blog in a couple of days: http://www.thenisaid.com

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Parse error’ is closed to new replies.