From: <dhe...@us...> - 2003-10-16 20:56:36
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs1:/tmp/cvs-serv7713 Modified Files: tiki-install.php Log Message: more small fixes to installer Index: tiki-install.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-install.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- tiki-install.php 16 Oct 2003 20:27:07 -0000 1.20 +++ tiki-install.php 16 Oct 2003 20:55:57 -0000 1.21 @@ -88,34 +88,47 @@ */ function create_dirs(){ - // Create directories as needed +/* old list of dirs +$dirs = array( + 'backups', + 'dump', + 'img/wiki', + 'img/wiki_up', + 'modules/cache', + 'temp', + 'templates_c', +); +*/ $dirs=array( - "backups", - "db", - "dump", - "img/wiki", - "img/wiki_up", - "modules/cache", - "temp", - "templates_c", - "var", - "var/log", - "var/log/irc", - "templates", - "styles", - "lib/Galaxia/processes"); + 'backups', + 'db', + 'dump', + 'img/wiki', + 'img/wiki_up', + 'modules/cache', + 'temp', + 'templates_c', + 'var', + 'var/log', + 'var/log/irc', + 'templates', + 'styles', + 'lib/Galaxia/processes'); - print "Checking directories:<br>"; foreach ($dirs as $dir) { + // Create directories as needed if (!is_dir($dir)) { - echo "Creating $dir directory.<br>"; @mkdir($dir,02775); } @chmod($dir,02775); + // Check again and report problems if (!is_dir($dir)) { - print "problem with $dir<br>"; + $ret .= "The directory '$docroot/$dir' does not exist.\n"; + } else if (!is_writeable($dir)) { + $ret .= "The directory '$docroot/$dir' is not writeable.\n"; } } + return $ret; } function isWindows() { @@ -177,9 +190,6 @@ } } -// Added to clear the Smarty cache before the install -//clean_cache(); - if (isset($_REQUEST['kill'])) { @$removed = rename('tiki-install.php', 'tiki-install.done'); @@ -278,6 +288,7 @@ $wwwgroup = 'nobody (or the group account the web server is running under)'; } +/* // First checking writeable directories $dirs = array( 'backups', @@ -299,6 +310,8 @@ $errors .= "The directory '$docroot/$dir' is not writeable by $wwwuser.\n"; } } +*/ +$errors .= create_dirs(); if ($errors) { $PHP_CONFIG_FILE_PATH = PHP_CONFIG_FILE_PATH; @@ -635,9 +648,5 @@ //print "<hr>"; //setup_help(); -//print "<hr>"; -//create_dirs(); -// Added to clear the Smarty cache after the install -//clean_cache(); ?> |