0
$sql = SQL::current(true);
0
if ($sql->connect(true) and !empty($config->url) and $sql->count("users"))
0
error(__("Already Installed"), __("Chyrp is already correctly installed and configured."));
0
- if (# Directory is NOT writable, .htaccess file does NOT already exist.
0
- (!is_writable(MAIN_DIR) and !file_exists(MAIN_DIR."/.htaccess")) or
0
- # .htaccess file DOES exist, IS writable, and it does NOT contain the Chyrp htaccess whatnot.
0
- (file_exists(MAIN_DIR."/.htaccess") and !is_writable(MAIN_DIR."/.htaccess") and !$htaccess_has_chyrp))
0
- $errors[] = _f("STOP! Before you go any further, you must create a .htaccess file in Chyrp's install directory and put this in it:\n<pre>%s</pre>", array(fix($htaccess)));
0
- if (!is_writable(INCLUDES_DIR))
0
- $errors[] = __("Chyrp's includes directory is not writable by the server. In order for the installer to generate your configuration files, please CHMOD or CHOWN it so that Chyrp can write to it.");
0
+ if ((!is_writable(MAIN_DIR) and !file_exists(MAIN_DIR."/.htaccess")) or
0
+ (file_exists(MAIN_DIR."/.htaccess") and !is_writable(MAIN_DIR."/.htaccess") and !$htaccess_has_chyrp))
0
+ $errors[] = _f("STOP! Before you go any further, you must create a .htaccess file in Chyrp's install directory and put this in it:\n<pre>%s</pre>", array(fix($htaccess)));
0
+ if (!is_writable(INCLUDES_DIR))
0
+ $errors[] = __("Chyrp's includes directory is not writable by the server. In order for the installer to generate your configuration files, please CHMOD or CHOWN it so that Chyrp can write to it.");
0
if ($_POST['adapter'] == "sqlite" and !is_writable(dirname($_POST['database'])))
0
$errors[] = __("SQLite database file could not be created. Please make sure your server has write permissions to the location for the database.");