• Resolved mh1

    (@mh1)


    Hi,
    I do have problems finding a solution with the “Cannot modify header information” warning. I read thru all the blogs and tried all the recos. No luck. No blanks, no breaks nothing. So thanks for any support you may have!

    Please find information below:

    my page shows:
    https://markus-ruth.ch/
    error:
    Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w0146fdd/markus-ruth.ch/wp-includes/functions.php:1) in /www/htdocs/w0146fdd/markus-ruth.ch/wp-content/themes/kidscare/functions.php on line 649

    Interesting: this is a replica of this page:
    https://www.kinderloft.ch/
    done with All-in-One WP-Migration.

    Now when I look in functions.php on line 1, it really all looks fine:

    Here a copy of the first few lines:

    <?php
    /**
    * Main WordPress API
    *
    * @package WordPress
    */
    require( ABSPATH . WPINC . ‘/option.php’ );
    /**
    * Convert given date string into a different format.
    *
    * $format should be either a PHP date format string, e.g. ‘U’ for a Unix
    * timestamp, or ‘G’ for a Unix timestamp assuming that $date is GMT.
    *
    * If $translate is true then the given date and format string will
    * be passed to date_i18n() for translation.
    *
    * @since 0.71
    *
    * @param string $format Format of the date to return.
    * @param string $date Date string to convert.
    * @param bool $translate Whether the return date should be translated. Default true.
    * @return string|int|bool Formatted date string or Unix timestamp. False if $date is empty.
    */

    I have spent a lot of time finding the issue with functions.php. Just no luck yet.

    So thanks for any support you may have!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try this function

    ob_start(); and ob_end_flush();

    <?php
    ob_start();
    /**
    * Main WordPress API
    *
    * @package WordPress
    */
    require( ABSPATH . WPINC . '/option.php' );
    /**
    * Convert given date string into a different format.
    *
    * $format should be either a PHP date format string, e.g. 'U' for a Unix
    * timestamp, or 'G' for a Unix timestamp assuming that $date is GMT.
    *
    * If $translate is true then the given date and format string will
    * be passed to date_i18n() for translation.
    *
    * @since 0.71
    *
    * @param string $format Format of the date to return.
    * @param string $date Date string to convert.
    * @param bool $translate Whether the return date should be translated. Default true.
    * @return string|int|bool Formatted date string or Unix timestamp. False if $date is empty.
    */
    ..
    ..
    ..
    ..
    
    ob_end_flush();
    ?>
    Thread Starter mh1

    (@mh1)

    Hi Rajan

    Did not help either. Same warning as before (see above).
    Any other ideas?

    Try after disable “all-in-one-wp-migration” plugin

    Thread Starter mh1

    (@mh1)

    I cannot do this, as I cannot login as admin… :-(.
    However, I would be surprised if this would work.
    markus-ruth.ch is a replica of kinderloft.ch.
    In kinderloft.ch I have still all-in-one-wp-migration as active.
    this page works. But again: I simply cannot login as admin.

    any other idea?

    Here’s the entire error message that’s currently appearing on your site at https://markus-ruth.ch/:

    “Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w0146fdd/markus-ruth.ch/wp-content/plugins/all-in-one-wp-migration/constants.php:1) in /www/htdocs/w0146fdd/markus-ruth.ch/wp-content/themes/kidscare/functions.php on line 649″

    I cannot do this, as I cannot login as admin…

    You don’t need to log in.

    Use your FTP client or the file manager in your hosts control panel to temporarily rename the all-in-one-wp-migration plugin directory and see if the symptom changes.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Eliminate the blank space at the beginning of the file.

    Thread Starter mh1

    (@mh1)

    @rajan V and
    @clayton James:
    => great! you saved my day. It now all works.

    @samuel Wood (Otto): I have tried this before and this never helped solving my particular problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Warning: Cannot modify header information – no solution found’ is closed to new replies.