Sunrise php warning - Cannot modify header information

Hey Guys, I have a clean WPMU Install with only the Domain Mapping plugin installed. Everything works great including the mapping. When I enable WP_DEBUG, I’m getting 1 notice and 2 warnings (see below). Should I be concerned about these?
Notice: Constant COOKIE_DOMAIN already defined in /home/wow123/public_html/wp-content/sunrise.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at /home/wow123/public_html/wp-content/sunrise.php:34) in /home/wow123/public_html/wp-includes/option.php on line 747
Warning: Cannot modify header information - headers already sent by (output started at /home/wow123/public_html/wp-content/sunrise.php:34) in /home/wow123/public_html/wp-includes/option.php on line 748
Thanks,
Dana

  • PC
    • WPMU DEV Initiate

    Hey there,

    Thanks for posting on the forums.

    You can ignore those warnings as that will not impact your website's functionality.

    However I would like you to double check and reconfirm if you have followed the steps here : https://premium.wpmudev.org/project/domain-mapping/#usage to set the plugin up properly ?

    Especially the below :

    You will see in the /domain-mapping/ folder there is a file called sunrise.php. We need to move that (move, not copy) to the /wp-content/ folder.

    So the path to that file will be:

    /wp-content/sunrise.php

    Have you already done that ?

    Please advise.

    Cheers, PC

  • Dana
    • New Recruit

    Hi Mac! Yes, sunrise.php was moved (not copied) to the /wp-content/ folder. I have double checked this. As I stated earlier, the plugin works great – I have mapped two test domains with no problems. My usual procedure when adding a new plugin is to turn wp_debug to (true) after the plugin has been added to check for any notices, warnings, errors, etc.
    Thanks for the help!
    Dana

  • Timothy Bowers
    • Chief Pigeon

    Thanks for letting us know.

    I just tested this and for some reason I didn't get the same messaged.

    Was it as you activate? In a specific area of the site, like the settings page?

    Anyway, as PC mentioned it's nothing to worry about and you shouldn't have a problem but if you do then please let us know.

    Take care.

  • Dana
    • New Recruit

    Hey Jack, with WP_DEBUG defined to “false”, there are NO notices or warnings. With WP_DEBUG set to true I see the 1 notice and 2 warnings as stated above in an earlier post. I’ve only mapped 2 Domains but they both worked fine.
    And No, no caching plugins, or any other plugins at the time these warnings. I’ve since move forward assured that these warnings were nothing to worry about.
    Thanks
    Dana

  • Jack Kitterhing
    • Code Norris

    Hi there Dana,

    Hope you're well today and thanks for the additional information.

    Are the warnings still showing? They are indeed nothing to worry about. And if needed we could disable error reporting on the server, though I wouldn't recommend that.

    Thanks!

    Hope you have a great weekend!

    Kind Regards
    Jack.

  • adam_fisher
    • Design Lord, Child of Thor

    You might check your wp-config.php file. A plugin may have inserted a definition for COOKIE_DOMAIN into the file without you knowing it. In my case, W3TC was the culprit. After deleting the line below the notice went away.

    define('COOKIE_DOMAIN', 'example.com'); // Added by W3 Total Cache

    I only deleted here because sunrise.php already has this constant defined.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.