if ( function_exists( 'mysqli_connect' ) ) {
if ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) {
} elseif ( false !== strpos( '[[wpver]]', '-' ) ) {
$version = __db_version();
if ( version_compare( $version, '5.5.3', '<' ) ) {
$client_version = mysqli_get_client_info();
$client_version = mysql_get_client_info();
* libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server.
* mysqlnd has supported utf8mb4 since 5.0.9.
if ( false !== strpos( $client_version, 'mysqlnd' ) ) {
$client_version = preg_replace( '/^\D+([\d.]+).*/', '$1', $client_version );
return version_compare( $client_version, '5.0.9', '>=' );
return version_compare( $client_version, '5.5.3', '>=' );
function __db_version() {
$server_info = mysqli_get_server_info( mysqli_connect("[[softdbhost]]","[[softdbuser]]","[[softdbpass]]","[[softdb]]"));
$server_info = mysql_get_server_info( mysql_connect("[[softdbhost]]","[[softdbuser]]","[[softdbpass]]","[[softdb]]"));
return preg_replace( '/[^0-9.].*/', '', $server_info );
echo '<claim_utf8>utf8mb4</claim_utf8>';
* Whether the server software is Apache or something else
* @global bool $soft_is_apache
$soft_is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
if(!empty($soft_is_apache)){
echo '<soft_apache>soft_is_apache</soft_apache>';
echo '<soft_apache>soft_not_apache</soft_apache>';
if(include_once('[[editor_path]]/site-inc/open_basedir.php')){
echo '<soft_open_basedir>SP_OBD_SUPPORTED</soft_open_basedir>';