• I’ve been having a problem with getting WordPress on my website up and running.
    When I go to my website, it says “Parse error: syntax error, unexpected ‘.1’ (T_DNUMBER) in … in line 34”

    The section of code that the error is in reads as follows (removed my personal info with asterisks):
    /** The name of the database for WordPress */
    define(‘DB_NAME’, “db******”);

    /** MySQL database username */
    define(‘DB_USER’, “db*******”);

    /** MySQL database password */
    define(‘DB_PASSWORD’, “*****”);

    /** MySQL hostname */
    define(“DB_HOST”, “db633418301.db.1and1.com”);

    The “.1” that is causing the error is part of the database host name and cannot be removed (I even tried “oneandone.com” instead but it wouldn’t work.
    If anyone could help I would strongly appreciate it, I’ve been stuck for over 24 hours.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, aarondye, & welcome to the WordPress support forum. Could you explain the hostname? I’m looking at 1and1 & it would seem the host name may actually be localhost.

    Thread Starter aarondye

    (@aarondye)

    When I looked up my PHP information on my 1and1 control panel, it says that the database host name is what I have listed above. I tried replacing it with “localhost”, but whenever I do that, my website instead says “Error establishing database connection” instead of the Parse error that is listed above.

    Hi, @aarondye. Try replacing all of the double quote marks with single quote marks instead, e.g.:

    /** MySQL hostname */
    define('DB_HOST', 'db633418301.db.1and1.com');

    (The double quote marks are probably causing the periods to be interpreted by PHP as concatenation operators instead of merely part of the hostname string.)

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

The topic ‘PHP Parse error: syntax error, unexpected T_DNUMBER’ is closed to new replies.