WordPress.org

Forums

WordPress MU Domain Mapping
Sunrise bug with 3.6 (Headers already sent and wpdb::escape) (31 posts)

  1. brasofilo
    Member
    Posted 1 year ago #

    In this thread, I just learned how to fix sunrise.php and not have bugs all over the network.

    In line 11 of the file, instead of $wpdb->escape, this must be used: $wpdb->_escape.

    http://wordpress.org/plugins/wordpress-mu-domain-mapping/

  2. Clifford Paulick
    Member
    Posted 1 year ago #

    me too

  3. TCBarrett
    Member
    Posted 1 year ago #

  4. johngiaconia
    Member
    Posted 1 year ago #

    Any update on if this will be integrated into a new release?

  5. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    @johngiaconia - a function that begins with an _ is designed to be a private function used within the class. I explained how to remove the warning here:

    http://wordpress.org/support/topic/wp-36-outputs-notice-warnings-escape?replies=12#post-4508678

  6. SysFailure0x5a
    Member
    Posted 1 year ago #

    It still needs to be fixed.

  7. lkraav
    Member
    Posted 1 year ago #

    Right, is there anything specific holding up a version bump?

  8. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    @ikraav - I've updated the development version.

  9. lionfish1011
    Member
    Posted 1 year ago #

    I am having troubles with the define('SUNRISE','on') when attempting to set up domain mapping. I moved sunrise.php to wp-content and tried placing define('SUNRISE','on') on wp-config the last line and above that's it Happy Blogging */. The define('SUNRISE','on') is messing up the entire Network admin page. When I've placed the define('SUNRISE','on') in various lines in wp-config, the Network Admin goes into a spiral and redirects the route to wp-admin.com. How do I set up domain mapping more successfully?

  10. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    You are missing a semi-colon

    define('SUNRISE','on')

    should be

    define('SUNRISE','on');

  11. RiseOfLex88
    Member
    Posted 1 year ago #

    Is there any update on this? It was a month ago that this made it's way to the dev version. Would be great to get live as my error log is filled with these messages.

  12. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    @riseoflex88 - you have to manually copy the new sunrise.php into place. The built in updater will not fix this for anyone.

    Download the development version and upload the sunrise.php from that zip to your wp-content directory.

  13. RiseOfLex88
    Member
    Posted 1 year ago #

    Ok great, updated, I'll monitor.

    Cheers Ron.

  14. Lanceosaurus
    Member
    Posted 1 year ago #

    @TCBarret - those fixes don't work for sunrise.php. If I substitute esc_sql for escape, I get:
    Fatal error: Call to undefined function esc_sql() in wp-content/sunrise.php on line 11

    I've tried:
    _escape - this works (but I understand it's not really a fix..)
    esc_sql - shows that error message
    $wpdb->esc_sql - Fatal error: Call to undefined method wpdb::esc_sql() in /opt/bitnami/apps/wordpress/htdocs/wp-content/sunrise.php on line 11

    I'm a WP noob, so I don't understand why esc_sql is missing for this file but seems available for other files.

    Note that replacing escape with esc_sql for all of the other plugins seemed to work, or at least I'm not seeing any errors about them. (akismet, google sitemap gen)

  15. peter_C
    Member
    Posted 1 year ago #

    basically the problem is:
    $dm_domain = $wpdb->escape( $_SERVER[ 'HTTP_HOST' ] );

    the escape can be left out, as afterwards $dm_domain
    is in the query in a prepared statement - meaning it's just a waste to escape it beforehand. And it's a $_SERVER variable anyway

    $dm_domain = $_SERVER[ 'HTTP_HOST' ];

    will do the trick

  16. Kevin James
    Member
    Posted 1 year ago #

    Is this fixed in 3.7.1 or will it be in 3.8 perhaps?

  17. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    @Kevin - download the development version & replace your sunrise.php with the one in the development version.

  18. Kevin James
    Member
    Posted 1 year ago #

    @Ron - that sounds like a Yes its fixed in 3.8.

    Thanks.

  19. HectorGuerrero
    Member
    Posted 1 year ago #

    Hey Ron I keep getting a blank screen on Index of /
    Apache Server at http://www.youngmoneygirl.com Port 80 what might cause this issue?

  20. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    @HectorGuerrero - your question is completely unrelated to the original topic of this thread. Please create a new thread.

  21. Frank Bueltge
    Member
    Posted 1 year ago #

    Hello Ron,
    I have also php notices with the current trunk version.
    I have fixed my notices and copy to this gist, include a diff.
    https://gist.github.com/bueltge/9116373

    Maybe this was easier for you to implement the version.
    I don't have a mail-address to contact you or Donncha to send a attachment. But I think, the changes are small and it is easy to use from the gist.

    Thanks and best regards!
    Frank

  22. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

  23. Frank Bueltge
    Member
    Posted 1 year ago #

    The diff show only on the domain-mapping.php?
    Inside the trunk is always active $wpdb->escape(), deprecated since WP 3.6.
    @see https://plugins.trac.wordpress.org/browser/wordpress-mu-domain-mapping/trunk/domain_mapping.php?rev=775577#L341

    Maybe I'm wrong, but the trunk in the link above have the escape method.

  24. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Your diff showed the original sunrise.php as having a $wpdb->escape on the line that I linked to in trunk (ie. the sunrise.php you compared to is not the trunk version).

  25. Frank Bueltge
    Member
    Posted 1 year ago #

    Hi Ron.
    I have update my trunk version, directly from SVN. Also I have update the diff inside the Gist: https://gist.github.com/bueltge/9116373

    The $wpdb->escape is currently in the trunk, file domain_mapping.php. The diff show only the changes on changelog.txt and domain_mapping.php.
    Maybe this helps you. On my installs works fine, without php notices.

  26. mkaschke
    Member
    Posted 1 year ago #

    Bug?

    Warning: include_once(/wp-content/sunrise.php) [function.include-once]: failed to open stream: No such file or directory in /wp-includes/ms-settings.php on line 18
    
    Warning: include_once() [function.include]: Failed opening '/wp-content/sunrise.php' for inclusion (include_path='.:/usr/lib/php5') in /wp-includes/ms-settings.php on line 18

    wordpress version 3.8.1 and wordpress-mu-domain-mapping Development Version

  27. d3v1an7
    Member
    Posted 1 year ago #

    Hi Ron,

    Trying to automate our WP install, so manual edits aren't really great anymore. Any chance of an update to domain_mapping.php?

    As Frank pointed out above, there are 3 existing $wpdb->escape calls on trunk and the latest patch branch.

    Ben

  28. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    @d3v1an7 - Download the development version. Replace domain_mapping.php in your install with the one in the development version.

  29. Kevin Langley
    Member
    Posted 1 year ago #

    Hi Ron,

    I'm confused as to why this issue as been sitting here for over 6 months without any fix in the latest release... The latest release was pushed on 4-17-14, but yet this still is not within the latest plugin release?

    Telling people to download the development version does not help users that pull in their dependencies via composer or some other automated method...

    Any chance on getting this fixed in a reasonable timeframe here?
    If not, I'm just going to write my own as it seems like this plugin is not even being supported anymore.

  30. Cleanshooter
    Member
    Posted 1 year ago #

    Ron - you guys really need to push the development version to the trunk of your SVN...

    Thanks in advance,

    -Joe

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic