Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#36629 closed defect (bug) (fixed)

Database connect functions can cause un-catchable warnings

Reported by: pento's profile pento Owned by: pento's profile pento
Milestone: 4.5.1 Priority: normal
Severity: normal Version: 4.5
Component: Database Keywords: fixed-major
Focuses: Cc:

Description

After [35860], there are reports of warnings being generated by both mysqli_real_connect() and mysql_connect().

See:

https://wordpress.org/support/topic/authentication-failure-on-upgrading-to-wp45
https://wordpress.org/support/topic/wp45-upgrade-mysql_connect-error

Attachments (1)

36629.diff (1.1 KB) - added by pento 8 years ago.

Download all attachments as: .zip

Change History (13)

#1 @pento
8 years ago

I'm inclined to go back to suppressing warnings for these functions.

#2 @pento
8 years ago

  • Owner set to pento
  • Status changed from new to accepted

#3 @dd32
8 years ago

I also agree that we need to suppress errors for the connect function and support a revert of the connection blocks in [35860].

We were previously using a conditional, so those in WP_DEBUG weren't having them hidden from them.

@pento
8 years ago

#4 @pento
8 years ago

  • Keywords has-patch added

#5 @dd32
8 years ago

36629.diff is what I was thinking. go for it @pento

#6 @pento
8 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 37292:

Database: Suppress connection error messages when WP_DEBUG isn't enabled.

This is a partial revert of [35860], which has been causing un-catchable warnings to be generated on some server configurations.

Fixes #36629 for trunk.
See #21870.

#7 @pento
8 years ago

  • Keywords fixed-major added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

This ticket was mentioned in Slack in #core by pento. View the logs.


8 years ago

#9 @pento
8 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 37293:

Database: Suppress connection error messages when WP_DEBUG isn't enabled.

This is a partial revert of [35860], which has been causing un-catchable warnings to be generated on some server configurations.

Merge of [37292] to the 4.5 branch.

Fixes #36629.
See #21870.

#10 follow-up: @Otto42
8 years ago

For reference, anybody having these warnings appear does indeed have problems outside of just the WordPress instance, and there are other fixes available. Suppressing warning messages makes sense, but fixing the underlying problems works too.

More information on these two cases found is here:
https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=7#post-8274461

#11 in reply to: ↑ 10 @pento
8 years ago

Replying to Otto42:

Suppressing warning messages makes sense, but fixing the underlying problems works too.

Agreed. The good news is, @rmccue has agreed to do a better fix (than just a partial revert of [35860]) for trunk.

#12 @Otto42
8 years ago

Ah. Yeah, that's good too, but I didn't mean tricks with error_reporting and such. These two particular warnings that were spotted occur for reasons outside of WordPress. The mysql_old_password one happens because the server is using old password hashing mechanisms. The minor version mismatch happens because PHP has the wrong version of the php mysql libraries installed given the mysql client libraries available on the server.

Any user seeing these warnings should contact their host about it, and the host should be informed as to how to fix their systems so that the warnings do not occur, even if we're not suppressing them.

Suppressing them contingent on WP_DEBUG makes sense, regardless of the method.

Note: See TracTickets for help on using tickets.