• Not sure wether this is a bug so want to post here to see if anyone else can replicate or confirm.

    Running setup-config.php?step=2 (no wp-config.php) produces a ‘Headers already sent’ error

    Warning: Cannot modify header information - headers already sent by (output started at XXXX\wp-admin\setup-config.php:22) in XXXX\wp-includes\wp-db.php on line 306

    This is on a WAMP setup, so I tried replacing the file with one from the 2.01 ditribution and get the same error.

    It looks like the error is in the wp-db.php

    Can anyone else confirm before I report this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Maybe something here:
    Headers Already Sent FAQ question

    I am having the same problem.

    Runing MySql ver 5.0.15
    PHP ver 4.3.10-16
    Apache2 2.0.54

    test.php bundled with php reports
    MySQL_api 4.0.24
    Before running the wordpress install.php script, the expected MySql database was created. This is a new install, there are NO TABLES CREATED YET! No instructions for doing so, none have been discovered. Looking through the wordpress scripts, I haven’t yet found where these tables will be created. In wp-settings.php these table names are listed, but no columns defined/declared.

    No previous version of wordpress has ever been installed, so no existing database/tables present. The blank database expected in the 5 minute install was created, but no tables. (This is on a home LAN, not public.)

    Running the install script with wp-config.php properly edited to provide hostname, user, password, database name results in “Can not connect to database error”. MySQL user tables with correct privileges are present. Both “OLD_PASSWORD”, and “PASSWORD” have been tried. WordPress can not connect with either password format.
    (Yes, I am sure that MySql is running.)

    Running the install script with wp-config.php not present, setup-config.php properly detects the missing file, and offers to create one. After filling in the necessary entries for hostname, user, password, database, and “submit”ing the data, setup-config.php fails at step 2 with this same error.

    Warning: Cannot modify header information – headers already sent by (output started at /storage/Debian/wordpress/wp-admin/setup-config.php:22) in /storage/Debian/wordpress/wp-includes/wp-db.php on line 308

    I have seen the previous tip about white space, missing php tags, etc. Looking at setup-config.php I’m having trouble decrypting the nested code blocks in the three cases present.

    Note Appended: Looking at the scattered headers coded into various php scripts it occurs to me that it might be a better coding practice to have ONE FUNCTION that builds/outputs the required html header, and that ONE FUNCTION be called in each case when a header is appropriate, rather than having headers hand coded into various scripts multiple times.
    Just a thought.

    It’s whitespace outside of either
    <?php
    or
    ?>

    inside that whitespace doesn’t matter.

    Thread Starter apidevlab

    (@apidevlab)

    @podz this shouldn’t be a whitespace issue as the behaviour is also present in a ‘clean’ install of 2.1 replacing both setup-config.php & wp-db.php

    The wp-db.php is the culprit as far as I can tell, the issue is with function bail – Just wraps errors in a nice header and footer

    If I comment the following lines the error disappears:

    header( 'Content-Type: text/html; charset=utf-8');

    <h1 id="logo"><img alt="WordPress" src="http://static.wordpress.org/logo.png" /></h1>

    Something similar here http://trac.wordpress.org/ticket/2409

    Apparently something to do with failed mysql_connect, or mysql_open call.
    setup-config will not connect to mysql version 5.0.15 on ‘localhoast’, but when I specify a different host, on my home LAN, which is running mysql version 4.1.16, everything works!

    the host (on my LAN), that I wanted wordpress installed on apparently has a conflict between php4, and myqsl ver 5.

    It is not a wordpress issue, other than failing to handled the failed open, or connect in wp-db properly.

    It’s kinda interesting to see wordpress storing its documents on a host different from the host which is serving the documents to the user, and the host that is actually running the php scripts!

    Thread Starter apidevlab

    (@apidevlab)

    This is now fixed thanks to davidhouse patch

    http://trac.wordpress.org/attachment/ticket/2544/2544.diff

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Install Bug? setup-config.php?step=2’ is closed to new replies.