• Attempting a new install in a subdirectory but I think there’s something wrong with my wp-config-sample.php file that I downloaded with version 3.1.2

    The troubleshooting guide suggests the file should end with these characters – ?> – particularly noting: “Check that the last line contains nothing but ?>, and that there is no text after it (not even whitespace).”

    That’s not there in wp-config-sample.php in my download made today or the version that is up on the wiki.

    My last line in the sample is line 90 and is the following:
    require_once(ABSPATH . ‘wp-settings.php’);

    Any ideas of where I went wrong or is the sample file somehow borked?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Not – it’s fine. The closing ?> has been deliberately omitted.

    When PHP parses a file it will echo anything not inside php tags, as well as anything explicitly echoed form inside those tags. That means that if you include the closing php tag and also have a space or anything else after it that extra content gets echoed and can result in things like “headers already sent” errors. I’ve read that it can also break other things like generated images, though I haven’t personally seen that. It seems like a little bit of quirk in PHP, but if you don’t close that tag you avoid those errors.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Missing close tag in wp-config.php maybe?’ is closed to new replies.