Opened 18 years ago
Closed 18 years ago
#3293 closed defect (bug) (fixed)
Bypassing mysql library check for mysqli usage
Reported by: | morpheu5 | Owned by: | masquerade |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 2.0.4 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
As suggested by masquerade in http://trac.wordpress.org/ticket/3292 I'm proposing this workaround that checks for mysql or mysqli library loaded. I've converted the WP code to mysqli as suggested by http://forge.mysql.com/wiki/Converting_to_MySQLi and it works. I guess this is not a matter of saying "we don't use it, we don't care" because my experience is that if a technology is intended to replace an older one, it *must* be taken in account *even if* you actually don't use it. It's called "flexibility" in the real world, I guess...
Workaround:
/wp-settings.php row 53
if ( !extension_loaded('mysqli') and !extension_loaded('mysql') )
Attachments (1)
Change History (5)
#2
@
18 years ago
I'm not experiencing any pain with my solution, I don't have mysql extension loaded and I have a fully converted WP installation.
#3
@
18 years ago
I know that you don't experience it, because you converted your wp-db.php to be compatible with mysqli.
Most people won't do that (or know how to) and thus experience a Wordpress breakdown if their server has mysqli, but not mysql available, because the default wp-db.php won't work in that case.
I think we should link the mysql extension check to the existance of the custom db.php. Right now the mysql extension has to be present, even if the custom db.php uses an entirely different engine.
Mysqli support could than be achieved by a custom db.php 'plugin'.
Patch for this attached.