Support » Networking WordPress » Error Messagedefine( ‘SUNRISE’, ‘on’ ); above the last require_once() in that fi

  • When I visit wp-admin/network/settings.php?page=dm_admin_page I get the following message:

    Please edit your /home2/research/public_html/wp-config.php and move the line ( ‘SUNRISE’, ‘on’ ); above the last require_once() in that file or make sure you updated sunrise.php.

    I can’t see the error in wp-config.php because it looks like this:

    /** Sets up WordPress vars and included files. */

    define(‘SUNRISE’, ‘on’);

    require_once(ABSPATH . ‘wp-settings.php’);

    If I understand the error message this looks correct.

    Any help would be most welcome.

    The page I need help with: [log in to see the link]

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


    Do you have the sunrise.php file in wp-content/ of the wordpress installation?
    if so, check if the define(‘SUNRISE’, ‘on’); is quoted with ” not with ‘’

    I hope this helps?



    tick marks not quote marks

    I’m now even more lost.

    The define(‘SUNRISE’,’on’); line is now missing from sunrise.php.

    Here is what I can see:


    if ( defined( ‘COOKIE_DOMAIN’ ) ) {
    die( ‘The constant “COOKIE_DOMAIN” is defined (probably in wp-config.php). Please remove or comment out that define() line.’ );

    // let the site admin page catch the VHOST == ‘no’
    $wpdb->dmtable = $wpdb->base_prefix . ‘domain_mapping’;
    $dm_domain = $wpdb->escape( $_SERVER[ ‘HTTP_HOST’ ] );

    if( ( $nowww = preg_replace( ‘|^www\.|’, ”, $dm_domain ) ) != $dm_domain )
    $where = $wpdb->prepare( ‘domain IN (%s,%s)’, $dm_domain, $nowww );
    $where = $wpdb->prepare( ‘domain = %s’, $dm_domain );

    $domain_mapping_id = $wpdb->get_var( “SELECT blog_id FROM {$wpdb->dmtable} WHERE {$where} ORDER BY CHAR_LENGTH(domain) DESC LIMIT 1” );
    $wpdb->suppress_errors( false );
    if( $domain_mapping_id ) {
    $current_blog = $wpdb->get_row(“SELECT * FROM {$wpdb->blogs} WHERE blog_id = ‘$domain_mapping_id’ LIMIT 1”);
    $current_blog->domain = $_SERVER[ ‘HTTP_HOST’ ];
    $current_blog->path = ‘/’;
    $blog_id = $domain_mapping_id;
    $site_id = $current_blog->site_id;

    define( ‘COOKIE_DOMAIN’, $_SERVER[ ‘HTTP_HOST’ ] );

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.