message = "Missing: " . VARPATH; $error->instructions[] = "mkdir " . VARPATH; $error->instructions[] = "chmod 777 " . VARPATH; $errors[] = $error; } else if (!is_writable(VARPATH)) { $error = new stdClass(); $error->message = "Not writable: " . VARPATH; $error->instructions[] = "chmod 777 " . VARPATH; $errors[] = $error; } $db_php = VARPATH . "database.php"; if (!file_exists($db_php)) { $error = new stdClass(); $error->message = "Missing: $db_php"; $error->instructions[] = "cp kohana/config/database.php $db_php"; $error->instructions[] = "chmod 644 $db_php"; $error->message2 = "Then edit this file and enter your database configuration settings."; $errors[] = $error; } else if (!is_readable($db_php)) { $error->message = "Not readable: $db_php"; $error->instructions[] = "chmod 644 $db_php"; $error->message2 = "Then edit this file and enter your database configuration settings."; $errors[] = $error; } if (empty($errors)) { Database::instance()->connect(); } $this->_create_directories(); $this->template = new View('welcome_syscheck.html'); $this->template->errors = $errors; } function _create_directories() { foreach (array("logs") as $dir) { @mkdir(VARPATH . "$dir"); } } }