#36629 closed defect (bug) (fixed)
Database connect functions can cause un-catchable warnings
Reported by: |
|
Owned by: |
|
---|---|---|---|
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)
Change History (13)
#3
@
9 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.
#5
@
9 years ago
36629.diff is what I was thinking. go for it @pento
#7
@
9 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.
9 years ago
#10
follow-up:
↓ 11
@
9 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
@
9 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
@
9 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.
I'm inclined to go back to suppressing warnings for these functions.