Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#30477 closed defect (bug) (duplicate)

Assistance required debugging 4.1-beta2-30532 wp-db.php problem

Reported by: dfavor's profile dfavor Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Database Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Someone tell me the correct way to log all queries to debug.log as they execute, so I can debug this...


[24-Nov-2014 13:51:13 UTC] PHP Warning:  mysqli_fetch_object() expects parameter 1 to be mysqli_result, boolean given in /cluster/vhost/ on line 1677
[24-Nov-2014 13:51:13 UTC] PHP Stack trace:
[24-Nov-2014 13:51:13 UTC] PHP   1. {main}() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP   2. require_once() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP   3. require_once() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP   4. require_once() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP   5. require_wp_db() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP   6. wpdb->__construct() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP   7. wpdb->db_connect() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP   8. wpdb->set_sql_mode() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP   9. wpdb->query() /cluster/vhost/
[24-Nov-2014 13:51:13 UTC] PHP  10. mysqli_fetch_object() /cluster/vhost/

Change History (9)

#1 @dfavor
9 years ago

All plugins turned off. Twenty Fifteen active.

#2 @dfavor
9 years ago

Hum... seems like I found the place to insert debug code.

Offending query seems to be...

query   : SELECT option_value FROM wp_options WHERE option_name = '_transient_dash_4077549d03da2e451c8b5f002294ff51' LIMIT 1

Checking http://$site/wp-admin/options.php this transient does exist, so I'm unsure why the error is being thrown.

<div class="rss-widget"><ul><li><a class='rsswidget' href=''>WordPress 4.0.1 Security Release</a> <span class="rss-date">November 20, 2014</span><div class="rssSummary">WordPress 4.0.1 is now available. This is a critical security release for all previous versions and we strongly encourage you to update your sites immediately. Sites that support automatic background updates will be updated to WordPress 4.0.1 within the next few hours. If you are still on WordPress 3.9.2, 3.8.4, or 3.7.4, you will be […]</div></li></ul></div><div class="rss-widget"><ul><li><a class='rsswidget' href=''>WPTavern: WordPress 4.1 to Remove Custom Background and Header Admin Screens</a></li><li><a class='rsswidget' href=''>WPTavern: Hierarchy Plugin Enhances WordPress as a CMS</a></li><li><a class='rsswidget' href=''>WPTavern: WordPress 4.0.1 Exposes Bad Development Practices Used in Some Plugins</a></li></ul></div><div class="rss-widget"><ul><li class='dashboard-news-plugin'><span>Popular Plugin:</span> <a href='' class='dashboard-news-plugin-link'>Jetpack by</a> <span>(<a href='plugin-install.php?tab=plugin-information&plugin=jetpack&_wpnonce=42054dbbfe&TB_iframe=true&width=600&height=800' class='thickbox' title='Jetpack by'>Install</a>)</span></li></ul></div>
Last edited 9 years ago by SergeyBiryukov (previous) (diff)

#3 @dfavor
9 years ago

Hum... Looks like this error is being thrown for many query sets.

#4 @SergeyBiryukov
9 years ago

  • Description modified (diff)

#5 @SergeyBiryukov
9 years ago

  • Version set to trunk

#6 @pento
9 years ago

Hi dfavor!

Going by the stack trace you posted, this seems to have happened when the DB first connected, and tried to set the sql_mode.

In your query log, could you please find the full query that starts with this?

SET SESSION sql_mode=

Also, what version of MySQL are you running?

#7 @johnbillion
9 years ago

  • Keywords reporter-feedback added

#8 @johnbillion
9 years ago

dfavor, can you let us know the answer to Pento's question above please?

#9 @pento
9 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #27982.

No need for feedback, this was fixed by [30677].

Note: See TracTickets for help on using tickets.