WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#29096 new defect (bug)

Confusing errors when mysqli fails but mysql works

Reported by: paulschreiber Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.9
Component: Database Keywords:
Focuses: Cc:

Description

If your php.ini is misconfigured so that mysqli fails but mysql succeeds, you get a seemingly spurious "no such file or directory" error on the setup screen.

This is confusing because you simultaneously have an error condition and success.

It would be good to alert the user that we had to fall back so the cause of the fallback can be investigated.

Attachments (1)

29096.patch (1.8 KB) - added by paulschreiber 3 years ago.

Download all attachments as: .zip

Change History (5)

@paulschreiber
3 years ago

#1 @tellyworth
3 years ago

  • Version changed from trunk to 3.9

#2 @SergeyBiryukov
3 years ago

  • Component changed from General to Database

#3 @dd32
3 years ago

It'd be good to get a list of requirements that need to be hit for this case to show up.

As far as I can tell, it requires

  • MySQL to be setup not to use networking
  • WordPress to be setup to use networking, not a socket address
  • php.ini mysqli set to incorrect socket path
  • php.ini mysql set to correct socket path

Does that sound like the correct set of conditions to reproduce this?

#4 @paulschreiber
3 years ago

Yes, that is one way of reproducing this, yes. By default, MySQL and PHP on OS X both use socket connections, not networking, so this is a common setup.

Note: See TracTickets for help on using tickets.