• Resolved SusanM

    (@susanm)


    I am trying to install wp in a subdirectory and am receiving the following error:

    Parse error: syntax error, unexpected T_STRING in /home/illusive/public_html/blog/wp-config.php on line 6

    The following is my wp-config.php text:
    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘illusive_blog’);
    // The name of the database
    define(‘DB_USER’, ‘illusive_xxxxx’);
    // Your MySQL username
    define(‘DB_PASSWORD’, ‘xxxxxxxx’);
    // …and password
    define(‘DB_HOST’, ‘illusive_blog’);
    // 99% chance you won’t need to change this value

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = ‘wp_’;
    // Only numbers, letters, and underscores please!

    // Change this to localize WordPress.
    A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    //
    For example, install de.mo to wp-includes/languages and set WPLANG to ‘de’
    // to enable German language support.
    define
    (‘WPLANG’, ”);

    /* That’s all, stop editing! Happy blogging. */

    define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    The url of the actual site I am trying to install on is:
    https://www.illusivelife.com/blog

    I’m new to WP from MT so I’m not sure what else you would need…

    Thanks for any help.
    Susan

Viewing 14 replies - 16 through 29 (of 29 total)
  • try removing the double slash in front of the empty line

    and remove the double slash from these lines

    //* That’s all, stop editing! Happy blogging. */
    this should be
    /* That’s all, stop editing! Happy blogging. */

    these should have no slashes in front
    //define(‘ABSPATH’, dirname(__FILE__).’/’);
    //require_once(ABSPATH.’wp-settings.php’);
    ?>

    Thread Starter SusanM

    (@susanm)

    Okay, I’m about to give up on this darn thing.

    Now I get this:

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    it’s actually a huge improvement…though it doesn’t seem like it.

    Now you want to check to make sure that there are no spaces between your username, password etc and the single quotes.

    Make sure the password you are using is the one associated with your database, and the data base name is inserted exactly as it appears on your cpanel or phpmyadmin

    and if you’re completely disheartened you can get someone else to install it for you

    https://install4free.wordpress.com/

    Thread Starter SusanM

    (@susanm)

    Well, I requested someone install this about two weeks ago but no one ever responded so I figure you can’t complain for a free service…I would just try it myself.

    So…I’ll see what I can see I guess.

    you might consider reinstalling the wordpress files and trying the install from scratch.

    I’d offer my help but I’m not on the list of peers so you would be taking your chances.

    good luck, when you get it..it will all seem so simple..trust me. ??

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Good grief.
    Try this:

    -Re-download the WordPress files.
    -Make a copy of the wp-config-sample.php
    -Edit it and change absolutely *nothing* other than the first four lines to put in your information. And use Notepad to do it, no fancy editors or anything.

    You should not be commenting out lines. You should not be removing comments. All you should do is change those 4 settings. That’s it. Nothing else.

    Well, I requested someone install this about two weeks ago but no one ever responded

    I never saw a request. I’m looking right now, and you’re not in there – not even in the spam area. At least, not under “illusivelife” or “Susan”…I *will* say, though, that we’ve had a few requests lately with invalid email addresses, so when we respond, we get bounce messages or “no such user” stuff back.

    And exactly what Otto said – you should only be editing those first four lines and not touching anything else.

    Now I get this:

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    One possible cause may be “localhost”. Would I be right in guessing that you use a hosting company for your site, rather than running your own server?

    Most hosting companies will store your web pages and database on one server. This means the DB is local to the website so define(‘DB_HOST’, ‘localhost’); would be correct.

    However, some hosts (such as 1&1) have the database on a different server. If this is the case then entering define(‘DB_HOST’, ‘localhost’); would be wrong because the database isn’t local to the website.

    If you post the name of your hosting company here someone here may know. Otherwise you may need to ask them or check the info they supplied you to check the host name for the database.

    Thread Starter SusanM

    (@susanm)

    Okay – to start with, I am sending in another request for help installing WP. I got a comment waiting moderation. I simply said help please.

    Second, this is the connection string lingo from my cpanel msql maintenance account:

    Connection Strings
    Perl $dbh = DBI->connect(“DBI:mysql:illusive_blog:localhost”,”illusive_susan”,”<PASSWORD HERE>”);
    PHP $dbh=mysql_connect (“localhost”, “illusive_susan”, “<PASSWORD HERE>”) or die (‘I cannot connect to the database because: ‘ . mysql_error());
    mysql_select_db (“illusive_blog”);

    and now shall I try wiping all the other stuff out and going with a clean install or wait to see if someone can hop in here and help?

    Thread Starter SusanM

    (@susanm)

    oh, I also apologize that it took so long to respond, I am watching my grandbaby, her daddy should be picking her up in an hour (3:35 CST) so if there is any other questions or whatnot I will be back around then. Ok?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    DBI->connect("DBI:mysql:illusive_blog:localhost","illusive_susan","<PASSWORD HERE>");

    This translates directly into these lines in your wp-config.php file:

    define('DB_NAME', 'illusive_blog');
    define('DB_USER', 'illusive_susan');
    define('DB_PASSWORD', 'YOUR_PASSWORD');
    define('DB_HOST', 'localhost');

    That should be the only things you change in your file.

    Thread Starter SusanM

    (@susanm)

    Okay, I failed to respond to the question about my server – will that have any bearing on this?

    I am completely deleting all files off server and then doing a clean install with the correct code in the wp-config.php file.

    I’ll let you know how things turn out.

    Thanks for your help so far!
    Susan

    Thread Starter SusanM

    (@susanm)

    *Sigh*

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    That is the error message I get now.

    The following is the actual wp-config.php text:

    <?php
    // ** MySQL settings ** //
    
    define('DB_NAME', 'illusive_blog');    // The name of the database
    
    define('DB_USER', 'illusive_susan');     // Your MySQL username
    
    define('DB_PASSWORD', 'xxxxxxx'); // ...and password
    
    define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value
    
    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!
    
    // Change this to localize WordPress.  A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');
    
    /* That's all, stop editing! Happy blogging. */
    
    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

    I guess maybe I should wait to see if someone wants to come install this because I must be doing something wrong. I think that I am about to give up on this. I didn’t have this much trouble with MT – so maybe I better stay put.

    Thread Starter SusanM

    (@susanm)

    I finally stumbled on the problem with this issue. Once I got all the parse errors worked out I got to looking at the newest errors (last post above) and then I went and looked at all the files and realized that I had inadvertantly changed the password for my database – once I changed it back and changed it on the wp-config file – the installation started right up.

    Thank you so much everyone who stepped in to help me with this.

    Now if I can just figure out this dashboard I will be good to go!

    Susan
    https://www.illusivelife.com
    https://www.illusivelife.com/blog

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘Parse Error’ is closed to new replies.