• Resolved philcurl

    (@philcurl)


    Whilst setting up a new site I suddenly recieved this error & can’t get back into WordPress again
    Parse error: syntax error, unexpected T_STRING in /home/pipi331/public_html/wp-config.php on line 17

    I know little or nothing about code, but line 17 appears to define the database name ??? can anyone help please.

Viewing 6 replies - 1 through 6 (of 6 total)
  • If you want to post line 17 here (or an excerpt of the area of the file) we can take a look. Be sure to remove/replace any passwords or usernames first.

    If you want to post more than 10 lines, please use a Pastebin.

    Thread Starter philcurl

    (@philcurl)

    Hi Zoonini
    I’ve pasted lines 16 – 19, hope you can shed some light on the problem.

    16 /** The name of the database for WordPress */
    17 define(‘DB_NAME’, ‘*********’);
    18 /** MySQL database username */
    19 define(‘DB_USER’, ‘*******’);

    Thanks
    Phil

    Hmm – that looks fine, the problem must be elsewhere. Can you copy the whole thing (minus sensitive info like passwords, etc.) into a Pastebin? http://pastebin.com/

    Also – make sure there are no blank lines at the top or bottom of the file.

    Just to be sure, from the Codex:

    Double Check Before Saving

    Be sure to check for leading and/or trailing spaces around any of the above values you entered, and DON’T delete the single quotes!

    Before you save the file, be sure to double-check that you have not accidentally deleted any of the single quotes around the parameter values. Be sure there is nothing after the closing PHP tag in the file. The last thing in the file should be ?> and nothing else. No spaces.

    http://codex.wordpress.org/Editing_wp-config.php

    Thread Starter philcurl

    (@philcurl)

    I took a clean copy of wp-config.php and inserted my database details into it as well as the keys at the end of the file & when i uploaded it I was able to access WordPress. So the problem is resolved but I am still at a loss as to what caused it, this is the second site that this has happened on (previously I just reloaded WP) could it be a particular plugin that could cause it? Thanks for your help with this problem.

    Glad you got it sorted. It’s difficult to say what it could have been – perhaps empty lines or spaces that are difficult to see with the naked eye?

    I’m marking this resolved for now – if it happens again, please start a new thread and post the file in a pastebin. Thanks!

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

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