• Resolved oliver826

    (@oliver826)


    Hi, I received the following error message:

    Parse error: syntax error, unexpected T_STRING in /home/content/84/10742684/html/indynjtl/wp-config.php on line 18.

    The site is down and I can only access it via FTP or through the file manager on my web server. I don’t know where to find the file/folder to access this code and fix it. Thank you in advance.

Viewing 15 replies - 1 through 15 (of 17 total)
  • What is in lines 16 – 20 of your wp-config.php file?

    Thread Starter oliver826

    (@oliver826)

    These are lines 16 – 20 in the wp-config.php file.
    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘indxxxx’);

    /** MySQL database username */
    define(‘DB_USER’, ‘[redacted]‘);

    Change your database password now! Never, ever, post sensitive information on a public forum.

    Thread Starter oliver826

    (@oliver826)

    I didn’t. Those are not the real numbers. Sorry for any confusion.

    I can’t see anything wrong with the snippet above. Can you post lines 10 – 16?

    Thread Starter oliver826

    (@oliver826)

    These are lines 9 – 16, so you can see the entire sentence.
    * This file is used by the wp-config.php creation script during the
    * installation. You don’t have to use the web site, you can just copy this file
    * to “wp-config.php” and fill in the values.
    *
    * @package WordPress
    */

    // ** MySQL settings – You can get this info from your web host ** //

    Thread Starter oliver826

    (@oliver826)

    I uninstalled WP (except for the WP-content folders/files) and then re-installed, and I uninstalled/re-installed the plugins. One plugin (301 redirect) seems to be the possible cause of this error. The error message occurred after I deactivated/deleted this plugin and refreshed the cache. Might be grasping at straws here, but am trying to offer more information for a possible solution.

    Has the error disappeared since deactivating the plugin?

    Thread Starter oliver826

    (@oliver826)

    No. The error message is the only thing I get when trying to sign-in through the admin screen or when looking at the site in a browser. Site URL is http://indynjtl.org.

    Can you recreate a fresh wp-config.php file using wp-config-sample.php as a template?

    Thread Starter oliver826

    (@oliver826)

    Okay, that might be the solution. I did this, and I now have an error that states:
    Error establishing a database connection.
    That looks promising.
    I did not include the keys/salts that were in the original wp-config.php file. Do I need to add those back? Otherwise, I can go through and just ensure that I don’t have any typos in the data.

    Do I need to add those back?

    I’d get a new set from https://api.ww.wp.xz.cn/secret-key/1.1/salt/

    Thread Starter oliver826

    (@oliver826)

    Well, no error messages, but the website is completely blank – white screen only. I did add the new set of salts/keys from your suggested link above. I will try without once and see what happens.

    Thread Starter oliver826

    (@oliver826)

    Ah, success. I was able to access the admin page, and I’m now back in business. Thank you esmi for your assistance and your patience in helping me with this problem. Always a learning experience with WordPress and PHP.

    Glad I could help πŸ™‚

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Cannot Locate PHP Parse/Syntax Error.’ is closed to new replies.