Esempio n. 1
0
# END WordPress
HTACCESS;
    file_put_contents('.htaccess', $tmp_htaccess);
    DupUtil::log("created basic .htaccess file.  If using IIS web.config this process will need to be done manually.");
    DupUtil::log("updated .htaccess file.");
} else {
    DupUtil::log("web configuration file was not renamed because the paths did not change.");
}
//===============================
//WARNING TESTS
//===============================
DupUtil::log("\n--------------------------------------");
DupUtil::log("WARNINGS");
DupUtil::log("--------------------------------------");
$config_vars = array('WP_CONTENT_DIR', 'WP_CONTENT_URL');
$config_found = DupUtil::string_has_value($config_vars, $config_file);
//Files
if ($config_found) {
    $msg = 'WP-CONFIG WARNING: The wp-config.php has one or more of these values "' . implode(", ", $config_vars) . '" which may cause issues please validate these values by opening the file.';
    $JSON['step2']['warnlist'][] = $msg;
    DupUtil::log($msg);
}
//Database
$result = @mysqli_query($dbh, "SELECT option_value FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name IN ('upload_url_path','upload_path')");
if ($result) {
    while ($row = mysqli_fetch_row($result)) {
        if (strlen($row[0])) {
            $msg = "MEDIA SETTINGS WARNING: The table '{$GLOBALS['FW_TABLEPREFIX']}options' has at least one the following values ['upload_url_path','upload_path'] set please validate settings. These settings can be changed in the wp-admin by going to Settings->Media area see 'Uploading Files'";
            $JSON['step2']['warnlist'][] = $msg;
            DupUtil::log($msg);
            break;