• I have followed the pdf guide point for point, but when I try loging in as admin after having added databases and changed the lines in dbsettings.php and wp-config.php, I get the following error when trying to access the site:

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/*/public_html/websitename.com/wp-config.php on line 36

    When I remove the string ‘require( ‘db­settings.php’ ); ‘ the site works again, but of course, I cannot continue following the pdf guide without this line. I can’t code to save my life, so I am sure there is some silly reason this doesn’t work for me, but please tell a silly man what he is doing wrong 🙂

    Regards
    Hans-Kristian

    https://ww.wp.xz.cn/plugins/shardb/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    Check that the quotes around db-settings.php are the single quote character next to your enter/return key.

    Plugin Author Ron Rennick

    (@wpmuguru)

    I am sure there is some silly reason this doesn’t work for me, but please tell a silly man what he is doing wrong 🙂

    Sometimes web browsers convert quotation marks into encoded quotation marks when you paste text.

    Thread Starter hofda

    (@hofda)

    OK, I had put in the line wrong. Now it looks like this:

    define(‘DB_COLLATE’, require( ‘db­settings.php’ ));

    I get a new error, but this time it looks to be about the dbsettings.php file, not the wp-config.php file.

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/hofda/public_html/classicxrated.com/dbsettings.php on line 15

    If I read it correctly, there is something wrong on line 15, I think thats where the database prefix is located, but I might count wrong (do you count lines with nothing in them?).

    Thread Starter hofda

    (@hofda)

    By the way, the line looks like this:
    $shardb_prefix = ‘hofda_’;

    Plugin Author Ron Rennick

    (@wpmuguru)

    define(‘DB_COLLATE’, require( ‘db­settings.php’ ));

    That’s not what the guide instructs you to do. Change that line back to the way it was. You are supposed to add the following line after all of the define( 'DB_* lines:

    require( 'db-settings.php');

    It should be on its own line with no text.

    Thread Starter hofda

    (@hofda)

    Putting them on different lines was what I did first, and there were no double quotations there when I checked. So back to square one.

    Now it looks like this in wp-config.php:

    define(‘DB_COLLATE’, ”);
    require( ‘dbsettings.php’);

    I get the same error I began with.

    Thread Starter hofda

    (@hofda)

    Sorry, when I upload to my FTP server, it doesn’t seem to take right away. I now get the same error I got last instead; Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/hofda/public_html/classicxrated.com/dbsettings.php on line 15

    Not sure why I got error on line 35 in wp-config the first time, as I can swear I was setting it the same way I have now.

    Plugin Author Ron Rennick

    (@wpmuguru)

    You likely have the same quote problem. The text of the message is the same a in your original post.

    Thread Starter hofda

    (@hofda)

    The problem is I can’t see a quote (“) anywhere on line 15, only single ‘ in front and behind the database prefix name. Am I misundertanding you?

    Below is line 14-16:

    $shardb_hash_length = 1;
    $shardb_prefix = ‘hofda_’;
    $shardb_dataset = ‘mb’;

    Plugin Author Ron Rennick

    (@wpmuguru)

    By quote I mean either a single quote or a double quote. Both lines 15 & 16 have single quotes.

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

The topic ‘Parse error when editing wp-config.php’ is closed to new replies.