Ticket #11637: 11637-php_version.diff
| File 11637-php_version.diff, 4.4 KB (added by nacin, 3 years ago) |
|---|
-
wp-admin/setup-config.php
37 37 require_once(ABSPATH . WPINC . '/compat.php'); 38 38 require_once(ABSPATH . WPINC . '/functions.php'); 39 39 require_once(ABSPATH . WPINC . '/classes.php'); 40 require_once(ABSPATH . WPINC . '/version.php'); 40 41 41 42 if (!file_exists(ABSPATH . 'wp-config-sample.php')) 42 43 wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.'); … … 51 52 if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php')) 52 53 wp_die("<p>The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>"); 53 54 54 if ( version_compare( '4.3', phpversion(), '>' ) )55 wp_die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version % s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, phpversion()) );55 if ( version_compare( $required_php_version, phpversion(), '>' ) ) 56 wp_die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %1$s but WordPress requires at least %2$s.'/*/WP_I18N_OLD_PHP*/, phpversion(), $required_php_version ) ); 56 57 57 58 if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') ) 58 59 wp_die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); -
wp-includes/wp-db.php
1092 1092 /** 1093 1093 * Retrieve the name of the function that called wpdb. 1094 1094 * 1095 * Requires PHP 4.3 and searches up the list of functions until it reaches1095 * Searches up the list of functions until it reaches 1096 1096 * the one that would most logically had called this method. 1097 1097 * 1098 1098 * @since 2.5.0 … … 1100 1100 * @return string The name of the calling function 1101 1101 */ 1102 1102 function get_caller() { 1103 // requires PHP 4.3+1104 if ( !is_callable('debug_backtrace') )1105 return '';1106 1107 1103 $bt = debug_backtrace(); 1108 1104 $caller = array(); 1109 1105 -
wp-settings.php
105 105 if ( empty($PHP_SELF) ) 106 106 $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]); 107 107 108 if ( version_compare( '4.3', phpversion(), '>' ) ) {109 die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, phpversion() ) );110 }111 112 108 if ( !defined('WP_CONTENT_DIR') ) 113 109 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down 114 110 … … 144 140 } 145 141 } 146 142 147 if ( !extension_loaded('mysql') && !file_exists(WP_CONTENT_DIR . '/db.php') )148 die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ );149 150 143 /** 151 144 * PHP 4 standard microtime start capture. 152 145 * … … 265 258 require (ABSPATH . WPINC . '/compat.php'); 266 259 require (ABSPATH . WPINC . '/functions.php'); 267 260 require (ABSPATH . WPINC . '/classes.php'); 261 require (ABSPATH . WPINC . '/version.php'); 268 262 263 if ( version_compare( $required_php_version, phpversion(), '>' ) ) 264 die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %1$s but WordPress requires at least %2$s.'/*/WP_I18N_OLD_PHP*/, phpversion(), $required_php_version ) ); 265 266 if ( !extension_loaded('mysql') && !file_exists(WP_CONTENT_DIR . '/db.php') ) 267 die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); 268 269 269 require_wp_db(); 270 270 271 271 if ( !empty($wpdb->error) ) … … 377 377 require (ABSPATH . WPINC . '/bookmark-template.php'); 378 378 require (ABSPATH . WPINC . '/kses.php'); 379 379 require (ABSPATH . WPINC . '/cron.php'); 380 require (ABSPATH . WPINC . '/version.php');381 380 require (ABSPATH . WPINC . '/deprecated.php'); 382 381 require (ABSPATH . WPINC . '/script-loader.php'); 383 382 require (ABSPATH . WPINC . '/taxonomy.php');