Changeset 27257
- Timestamp:
- 02/25/2014 03:52:48 PM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/load.php
r25455 r27257 108 108 } 109 109 110 if ( ! extension_loaded( 'mysql' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) {110 if ( ! extension_loaded( 'mysql' ) && ! extension_loaded( 'mysqli' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) { 111 111 wp_load_translations_early(); 112 112 die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); -
trunk/src/wp-includes/wp-db.php
r27250 r27257 569 569 $this->show_errors(); 570 570 571 $this->use_mysqli = ( version_compare( phpversion(), '5.5', '>=' ) && function_exists( 'mysqli_connect' ) ); 571 /* Use ext/mysqli if it exists and: 572 * - We are a development version of WordPress, or 573 * - We are running PHP 5.5 or greater, or 574 * - ext/mysql is not loaded. 575 */ 576 if ( function_exists( 'mysqli_connect' ) ) { 577 if ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) { 578 $this->use_mysqli = true; 579 } elseif ( false !== strpos( $GLOBALS['wp_version'], '-' ) ) { 580 $this->use_mysqli = true; 581 } 582 } 572 583 573 584 $this->init_charset();
Note: See TracChangeset
for help on using the changeset viewer.