"Directory Permissions Error", "rec" => "Make ".SERVER_ROOT.$directory." writable.", "status" => "bad" ); } } // Setup a recursive function to loop through fields $directory_warnings = array(); $recurse_fields = function($fields) { global $directory_warnings,$recurse_fields,$warnings; foreach (array_filter((array)$fields) as $key => $data) { $options = is_string($data["options"]) ? array_filter((array)json_decode($data["options"],true)) : $data["options"]; if ($data["type"] == "matrix") { $recurse_fields($options["columns"]); } else { if ($options["directory"]) { if (!BigTree::isDirectoryWritable(SITE_ROOT.$options["directory"]) && !in_array($options["directory"],$directory_warnings)) { $directory_warnings[] = $options["directory"]; $warnings[] = array( "parameter" => "Directory Permissions Error", "rec" => "Make ".SITE_ROOT.$options["directory"]." writable.", "status" => "bad" ); } } } } }; // Go through every module form and look for uploads, make sure the directories exist and are writable. $forms = array_merge($admin->getModuleForms(),$admin->getModuleEmbedForms()); foreach ($forms as $form) { $recurse_fields($form["fields"]); } // Now templates and callouts $templates = array_merge($admin->getTemplates(),$admin->getCallouts()); foreach ($templates as $template) { $recurse_fields(json_decode($template["resources"],true)); } // Search all content for links to the admin. $bad = $admin->getPageAdminLinks(); foreach ($bad as $f) { $warnings[] = array( "parameter" => "Bad Admin Links", "rec" => 'Remove links to Admin on '.$f["nav_title"].'', "status" => "ok" ); } if (!file_exists(SITE_ROOT."favicon.ico")) { $warnings[] = array( "parameter" => "Missing Favicon", "rec" => "Create a favicon and place it in the /site/ root.", "status" => "ok" ); } //!Server Parameters $mysql = (extension_loaded('mysql') || extension_loaded("mysqli")) ? "good" : "bad"; $magic_quotes_gpc = !get_magic_quotes_gpc() ? "good" : "bad"; $magic_quotes_runtime = !get_magic_quotes_runtime() ? "good" : "bad"; $file_uploads = ini_get('file_uploads') ? "good" : "bad"; $short_tags = ini_get('short_open_tag') ? "good" : "bad"; $image_support = extension_loaded('gd') ? "good" : "bad"; $curl_support = extension_loaded('curl') ? "good" : "bad"; $upload_max_filesize = ini_get('upload_max_filesize'); $post_max_size = ini_get('post_max_size'); $max_file = (intval($upload_max_filesize) > intval($post_max_size)) ? intval($post_max_size) : intval($upload_max_filesize); $max_check = "bad"; if ($max_file >= 4) { $max_check = "ok"; } if ($max_file >= 8) { $max_check = "good"; } $mem_limit = ini_get("memory_limit"); $memory_limit = (intval($mem_limit) > 32) ? "good" : "bad"; ?>

Critical errors appear in red, warnings appear in yellow, and successes appear in green.

Warnings

Warning Recommended Action Status

Server Parameters

Site Parameter Recommended Value Status