WordPress.org

Forums

[resolved] Parse Error (30 posts)

  1. SusanM
    Member
    Posted 8 years ago #

    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:
    http://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

  2. SusanM
    Member
    Posted 8 years ago #

    I'm still waiting to see if someone can help me with this installation.

    I currently use MT but am told WordPress is better so I would like to check it out myself but can't get past this error and I am scratching my head bald over this.

    Can anyone help me please?

  3. 4k
    Member
    Posted 8 years ago #

    on 'DB_HOST' try changing illusive_blog back to localhost

  4. SusanM
    Member
    Posted 8 years ago #

    Well that is wierd...I didn't notice that, but looking and this is what is on the wp-config.php file:

    <?php
    // ** MySQL settings **
    //
    define('DB_NAME', 'illusive_xxxx');
    // The name of the database
    define('DB_USER', 'illusive_xxxxx');
    // 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.
    //

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

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

    and the error is now:
    Parse error: syntax error, unexpected T_STRING in /home/illusive/public_html/blog/wp-config.php on line 19

  5. 4k
    Member
    Posted 8 years ago #

    that error often relates to a missing punctuation

    I notice this is missing from what you cut and pasted

    to enable German language support.
    define ('WPLANG', '');

    try adding that back in beside the double slash under
    // chosen language must be installed to wp-includes/languages.

  6. TimoK
    Member
    Posted 8 years ago #

    It would help if you could copy&paste your wp-config.php in between backticks, so it is formatted exactly as the PHP-Parser sees it.

  7. SusanM
    Member
    Posted 8 years ago #

    that doesn't seem to be an issue - I still get the error message.

  8. SusanM
    Member
    Posted 8 years ago #

    <?php
    // ** MySQL settings **
    //
    define('DB_NAME', 'illusive_blog');
    // The name of the database
    define('DB_USER', 'illusive_xxxxx');
    // 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');
    ?>
  9. SusanM
    Member
    Posted 8 years ago #

    is that what you were asking for?

  10. SusanM
    Member
    Posted 8 years ago #

    anyone else care to try to jump in?

  11. TimoK
    Member
    Posted 8 years ago #

    Sorry, I was sleeping.
    Prefix the lines starting with A corresponding MO file and For example, install de.mo to with // each and your problem should be solved.

  12. SusanM
    Member
    Posted 8 years ago #

    Oh my gosh, you lost me - can you explain this to me a bit more?

  13. Doodlebee
    Member
    Posted 8 years ago #

    Just what he said. Change this:

    // 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.

    to this:

    // 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.

    You were missing backslashes, and PHP can't render the file correctly with invalid code.

  14. 4k
    Member
    Posted 8 years ago #

    make sure all the lines have a double slash in front

    from your example
    this should be moved up beside the double slash
    For example, install de.mo to wp-includes/languages and set WPLANG to 'de'

    and
    A corresponding MO file for the

    same thing

  15. SusanM
    Member
    Posted 8 years ago #

    Oh my goodness, this appears to be a bit more complicated than I realized. Now after changing what you suggested I get this error:

    Warning: main(ABSPATH/wp-admin/admin-functions.php) [function.main]: failed to open stream: No such file or directory in /home/illusive/public_html/blog/wp-admin/upgrade-functions.php on line 5

    Fatal error: main() [function.require]: Failed opening required 'ABSPATH/wp-admin/admin-functions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/illusive/public_html/blog/wp-admin/upgrade-functions.php on line 5

    and this is the actual code for the wp-config.php file:

    <?php
    // ** MySQL settings **
    //
    define('DB_NAME', 'illusive_blog');
    // The name of the database
    define('DB_USER', 'illusive_xxxxx');
    // 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.
    
    //* That's all, stop editing! Happy blogging. */
    
    //define('ABSPATH', dirname(__FILE__).'/');
    //require_once(ABSPATH.'wp-settings.php');
    ?>

    is that correct, also, I notice the error states upgrade and this is a new installation.

  16. SusanM
    Member
    Posted 8 years ago #

    Okay, so I see one error and fixed it but now I have this:

    Fatal error: Call to undefined function: __() in /home/illusive/public_html/blog/wp-admin/admin-functions.php on line 1593

    and this is the actual code for the wp-config.php file:

    <?php
    // ** MySQL settings **
    //
    define('DB_NAME', 'illusive_blog');
    // The name of the database
    define('DB_USER', 'illusive_xxxxx');
    // 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.
    
    //* That's all, stop editing! Happy blogging. */
    
    define('ABSPATH', dirname(__FILE__).'/');
    //require_once(ABSPATH.'wp-settings.php');
    ?>

    is that correct?

  17. 4k
    Member
    Posted 8 years ago #

    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');
    ?>

  18. SusanM
    Member
    Posted 8 years ago #

    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.

  19. 4k
    Member
    Posted 8 years ago #

    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

    http://install4free.wordpress.com/

  20. SusanM
    Member
    Posted 8 years ago #

    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.

  21. 4k
    Member
    Posted 8 years ago #

    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. :)

  22. 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.

  23. Doodlebee
    Member
    Posted 8 years ago #

    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.

  24. obscure
    Member
    Posted 8 years ago #

    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.

  25. SusanM
    Member
    Posted 8 years ago #

    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?

  26. SusanM
    Member
    Posted 8 years ago #

    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?

  27. 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.

  28. SusanM
    Member
    Posted 8 years ago #

    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

  29. SusanM
    Member
    Posted 8 years ago #

    *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.

  30. SusanM
    Member
    Posted 8 years ago #

    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
    http://www.illusivelife.com
    http://www.illusivelife.com/blog

Topic Closed

This topic has been closed to new replies.

About this Topic