Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../var/softacul.../sp
File: check_charset.php
<?php
[0] Fix | Delete
[1] Fix | Delete
function __has_cap(){
[2] Fix | Delete
global $use_mysqli;
[3] Fix | Delete
[4] Fix | Delete
$use_mysqli = false;
[5] Fix | Delete
if ( function_exists( 'mysqli_connect' ) ) {
[6] Fix | Delete
if ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) {
[7] Fix | Delete
$use_mysqli = true;
[8] Fix | Delete
} elseif ( false !== strpos( '[[wpver]]', '-' ) ) {
[9] Fix | Delete
$use_mysqli = true;
[10] Fix | Delete
}
[11] Fix | Delete
}
[12] Fix | Delete
$version = __db_version();
[13] Fix | Delete
[14] Fix | Delete
if ( version_compare( $version, '5.5.3', '<' ) ) {
[15] Fix | Delete
return false;
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
if ( $use_mysqli ) {
[19] Fix | Delete
$client_version = mysqli_get_client_info();
[20] Fix | Delete
} else {
[21] Fix | Delete
$client_version = mysql_get_client_info();
[22] Fix | Delete
}
[23] Fix | Delete
[24] Fix | Delete
/*
[25] Fix | Delete
* libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server.
[26] Fix | Delete
* mysqlnd has supported utf8mb4 since 5.0.9.
[27] Fix | Delete
*/
[28] Fix | Delete
if ( false !== strpos( $client_version, 'mysqlnd' ) ) {
[29] Fix | Delete
$client_version = preg_replace( '/^\D+([\d.]+).*/', '$1', $client_version );
[30] Fix | Delete
return version_compare( $client_version, '5.0.9', '>=' );
[31] Fix | Delete
} else {
[32] Fix | Delete
return version_compare( $client_version, '5.5.3', '>=' );
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
return false;
[36] Fix | Delete
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
function __db_version() {
[40] Fix | Delete
global $use_mysqli;
[41] Fix | Delete
if ( $use_mysqli ) {
[42] Fix | Delete
$server_info = mysqli_get_server_info( mysqli_connect("[[softdbhost]]","[[softdbuser]]","[[softdbpass]]","[[softdb]]"));
[43] Fix | Delete
} else {
[44] Fix | Delete
$server_info = mysql_get_server_info( mysql_connect("[[softdbhost]]","[[softdbuser]]","[[softdbpass]]","[[softdb]]"));
[45] Fix | Delete
}
[46] Fix | Delete
return preg_replace( '/[^0-9.].*/', '', $server_info );
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
$has_cap = __has_cap();
[50] Fix | Delete
[51] Fix | Delete
if(!empty($has_cap)){
[52] Fix | Delete
echo '<claim_utf8>utf8mb4</claim_utf8>';
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
// Server detection
[56] Fix | Delete
[57] Fix | Delete
/**
[58] Fix | Delete
* Whether the server software is Apache or something else
[59] Fix | Delete
* @global bool $soft_is_apache
[60] Fix | Delete
*/
[61] Fix | Delete
$soft_is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
[62] Fix | Delete
[63] Fix | Delete
if(!empty($soft_is_apache)){
[64] Fix | Delete
echo '<soft_apache>soft_is_apache</soft_apache>';
[65] Fix | Delete
}else{
[66] Fix | Delete
echo '<soft_apache>soft_not_apache</soft_apache>';
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
if(include_once('[[editor_path]]/site-inc/open_basedir.php')){
[70] Fix | Delete
if(!empty($included)){
[71] Fix | Delete
echo '<soft_open_basedir>SP_OBD_SUPPORTED</soft_open_basedir>';
[72] Fix | Delete
}
[73] Fix | Delete
}
[74] Fix | Delete
[75] Fix | Delete
[76] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function