[resolved] Parse error (5 posts)

  1. mahrer96
    Posted 2 years ago #

    I'm getting the following error when trying to active WordPress:

    Parse error: syntax error, unexpected T_STRING in /home/content/96/10753696/html/projectgrad/wp-config.php on line 22

    Any thoughts???

  2. RossMitchell
    Posted 2 years ago #

    A) What is on line 22 of wp-config.php ? compare with wp-config-sample.php
    B) Start again with a clean wp-config.php, re enter you settings and try again.

  3. mahrer96
    Posted 2 years ago #

    Thanks for the reply.
    I recreated the config file.

    Now, line 22 is fine (it actually was before, containing the db name).

    Now I'm getting the same error on line 25, which is the db password. It is entered correctly, and the rest of the line is untouched from the sample config file.

  4. catacaustic
    very awesome
    Posted 2 years ago #

    That means that whatever error you had before on line 22 has been "moved" to line 25. Without seeing the code it's pretty much impossible for us to say what's wrong - but this is one of the few times that I'd tell you to not post the code because that's all around DB connection details so you'd have to change the connection details, and that can change the error...

    The best suggestion is to check (and re-check) where you're starting and ending strings. Something like this would throw an error...

    define('DB_NAME' 'my_db');

    It should be (note the comma):

    define('DB_NAME', 'my_db');

  5. mahrer96
    Posted 2 years ago #

    I finally figured this out, but what a pain!

    As per instructions, I've been using TextEdit on my Mac to alter the sample config file. I realized today that each time I typed over the sample text with my site's info, the apostrophe after the text became smart. In other words, it no long pointed straight down, but now pointed towards the text to the left. I copied and then pasted a "correct" apostrophe, and that did the trick!

    Thanks for the replies and attempts at help to both of you!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.