• Resolved madsthegram

    (@madsthegram)


    [ Moderator note: title adjusted, please refrain from using help, urgent, emergency, asap, etc. in topic titles. ]

    Hi guys.
    I have a deadline tomorrow so I really help someone can help me out. I have just uploaded all my files to my folders and databases, but when trying to type the url (www.privat.etikos.dk), the page is blank, and when trying to go behind the scenes (/wp-admin), I get the following message: Parse error: syntax error, unexpected T_STRING in /var/www/www.etikos.dk/wwwprivat/wp-config.php on line 22.

    My config files look like this:

    [ redacted ]

    Can anybody help me out?

    Best regards

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator t-p

    (@t-p)

    Syntax error indicates that you may have made a mistake while creating your PHP structure. When this error appears it will tell you which file the error appears in (e.g., functions.php) and approximately which line (it may not always be the exact line so be sure to check just before and just after) in the code. Try:
    – fix PHP structure in the file around the line indicated in the error message
    – or, upload a fresh copy (unedited) of this file

    Codex guide: https://codex.wordpress.org/Common_WordPress_Errors#Parse_errors

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    which line is line 22?

    Thread Starter madsthegram

    (@madsthegram)

    Line 22 is the username. As the name of my website indicates, this is a subdomain, which exsist along 3 other domains (2 subs, and one main). I even tried copying in the above part from the other sites config file, but I still get the same error message.

    Thread Starter madsthegram

    (@madsthegram)

    Ps. Wp-admin works when I try my local install on mamp. I tried changing and deleting in the username. It dosent even say problem with connecting to database. It just keeps on giving the same message.

    • This reply was modified 7 years, 5 months ago by madsthegram.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Look at that closely. you have a funny character (smart quote?) instead of an apostrophe

    I agree. I see one here – define('DB_NAME', 'xxx’);

    If that’s a copy-paste of the actual file, was it edited/saved with something other than a plain text editor at some point?

    Moderator t-p

    (@t-p)

    I notice apostrophe in
    ‘DB_NAME’
    ‘DB_USER’
    ‘DB_PASSWORD’

    is different than the one in
    ‘xxx’

    Also try reviewing this WP codex: http://codex.wordpress.org/Common_WordPress_Errors#Error_Establishing_Database_Connection

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You are not using apostophes around the strings!

    Thread Starter madsthegram

    (@madsthegram)

    Yes i noticed that too. Currently im trying to delete one of the subdomains and uploading the files in that directory to see if its a problem with the creation of the db framework

    Thread Starter madsthegram

    (@madsthegram)

    I made it work guys!
    The problem was that i used ´and` instead of ‘… Still having a hard time figuring the whole thing out, as I was merely using the sample platform to create to whole thing. Really glad for all the help though!

    Have a great evening!

    Best regards

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error in config file, line 22’ is closed to new replies.