"; echo ""; return; } if($DBhostname && $DBuserName && $DBname) { $configArray['DBhostname'] = $DBhostname; $configArray['DBuserName'] = $DBuserName; $configArray['DBpassword'] = $DBpassword; $configArray['DBname'] = $DBname; $configArray['DBPrefix'] = $DBPrefix; } else { echo "
"; echo ""; return; } if ($sitename) { if (!get_magic_quotes_gpc()) { $configArray['sitename'] = addslashes($sitename); } else { $configArray['sitename'] = $sitename; } } else { echo "
"; echo ""; return; } if (file_exists( '../configuration.php' )) { $canWrite = is_writable( '../configuration.php' ); } else { $canWrite = is_writable( '..' ); } if ($siteUrl) { $configArray['siteUrl']=$siteUrl; // Fix for Windows $absolutePath= str_replace("\\\\","/", $absolutePath); $configArray['absolutePath']=$absolutePath; $configArray['filePerms']=$filePerms; $configArray['dirPerms']=$dirPerms; $config = " Please check back again soon.';\n"; $config .= "\$mosConfig_error_message = 'This site is temporarily unavailable.
Please notify the System Administrator';\n"; $config .= "\$mosConfig_debug = '0';\n"; $config .= "\$mosConfig_lifetime = '900';\n"; $config .= "\$mosConfig_session_life_admin = '1800';\n"; $config .= "\$mosConfig_session_type = '0';\n"; $config .= "\$mosConfig_MetaDesc = 'Joomla - the dynamic portal engine and content management system';\n"; $config .= "\$mosConfig_MetaKeys = 'Joomla, joomla';\n"; $config .= "\$mosConfig_MetaTitle = '1';\n"; $config .= "\$mosConfig_MetaAuthor = '1';\n"; $config .= "\$mosConfig_locale = 'en_GB';\n"; $config .= "\$mosConfig_offset = '0';\n"; $config .= "\$mosConfig_offset_user = '0';\n"; $config .= "\$mosConfig_hideAuthor = '0';\n"; $config .= "\$mosConfig_hideCreateDate = '0';\n"; $config .= "\$mosConfig_hideModifyDate = '0';\n"; $config .= "\$mosConfig_hidePdf = '".intval( !is_writable( "{$configArray['absolutePath']}/media/" ) )."';\n"; $config .= "\$mosConfig_hidePrint = '0';\n"; $config .= "\$mosConfig_hideEmail = '0';\n"; $config .= "\$mosConfig_enable_log_items = '0';\n"; $config .= "\$mosConfig_enable_log_searches = '0';\n"; $config .= "\$mosConfig_enable_stats = '0';\n"; $config .= "\$mosConfig_sef = '0';\n"; $config .= "\$mosConfig_vote = '0';\n"; $config .= "\$mosConfig_gzip = '0';\n"; $config .= "\$mosConfig_multipage_toc = '1';\n"; $config .= "\$mosConfig_allowUserRegistration = '1';\n"; $config .= "\$mosConfig_link_titles = '0';\n"; $config .= "\$mosConfig_error_reporting = -1;\n"; $config .= "\$mosConfig_list_limit = '30';\n"; $config .= "\$mosConfig_caching = '0';\n"; $config .= "\$mosConfig_cachepath = '{$configArray['absolutePath']}/cache';\n"; $config .= "\$mosConfig_cachetime = '900';\n"; $config .= "\$mosConfig_mailer = 'mail';\n"; $config .= "\$mosConfig_mailfrom = '$adminEmail';\n"; $config .= "\$mosConfig_fromname = '{$configArray['sitename']}';\n"; $config .= "\$mosConfig_sendmail = '/usr/sbin/sendmail';\n"; $config .= "\$mosConfig_smtpauth = '0';\n"; $config .= "\$mosConfig_smtpuser = '';\n"; $config .= "\$mosConfig_smtppass = '';\n"; $config .= "\$mosConfig_smtphost = 'localhost';\n"; $config .= "\$mosConfig_back_button = '1';\n"; $config .= "\$mosConfig_item_navigation = '1';\n"; $config .= "\$mosConfig_secret = '" . mosMakePassword(16) . "';\n"; $config .= "\$mosConfig_pagetitles = '1';\n"; $config .= "\$mosConfig_readmore = '1';\n"; $config .= "\$mosConfig_hits = '1';\n"; $config .= "\$mosConfig_icons = '1';\n"; $config .= "\$mosConfig_favicon = 'favicon.ico';\n"; $config .= "\$mosConfig_fileperms = '".$configArray['filePerms']."';\n"; $config .= "\$mosConfig_dirperms = '".$configArray['dirPerms']."';\n"; $config .= "\$mosConfig_helpurl = 'http://help.joomla.org';\n"; $config .= "\$mosConfig_multilingual_support = '0';\n"; $config .= "\$mosConfig_editor = 'tinymce';\n"; $config .= "\$mosConfig_admin_expired = '1';\n"; $config .= "\$mosConfig_frontend_login = '1';\n"; $config .= "\$mosConfig_frontend_userparams = '1';\n"; $config .= "\$mosConfig_itemid_compat = '0';\n"; $config .= "setlocale (LC_TIME, \$mosConfig_locale);\n"; $config .= "?>"; if ($canWrite && ($fp = fopen("../configuration.php", "w"))) { fputs( $fp, $config, strlen( $config ) ); fclose( $fp ); } else { $canWrite = false; } // if $salt = mosMakePassword(16); $crypt = md5($adminPassword.$salt); $cryptpass = $crypt.':'.$salt; $database = new database( $DBhostname, $DBuserName, $DBpassword, $DBname, $DBPrefix ); $nullDate = $database->getNullDate(); // create the admin user $installdate = date('Y-m-d H:i:s'); $query = "INSERT INTO `#__users` VALUES (62, 'Administrator', 'admin', '$adminEmail', '$cryptpass', 'Super Administrator', 0, 1, 25, '$installdate', '$nullDate', '', '')"; $database->setQuery( $query ); $database->query(); // add the ARO (Access Request Object) $query = "INSERT INTO `#__core_acl_aro` VALUES (10,'users','62',0,'Administrator',0)"; $database->setQuery( $query ); $database->query(); // add the map between the ARO and the Group $query = "INSERT INTO `#__core_acl_groups_aro_map` VALUES (25,'',10)"; $database->setQuery( $query ); $database->query(); // chmod files and directories if desired $chmod_report = "Directory and file permissions left unchanged."; if ($filePerms != '' || $dirPerms != '') { $mosrootfiles = array( 'administrator', 'cache', 'components', 'images', 'language', 'mambots', 'media', 'modules', 'templates', 'configuration.php' ); $filemode = NULL; if ($filePerms != '') $filemode = octdec($filePerms); $dirmode = NULL; if ($dirPerms != '') $dirmode = octdec($dirPerms); $chmodOk = TRUE; foreach ($mosrootfiles as $file) { if (!mosChmodRecursive($absolutePath.'/'.$file, $filemode, $dirmode)) { $chmodOk = FALSE; } } if ($chmodOk) { $chmod_report = 'File and directory permissions successfully changed.'; } else { $chmod_report = 'File and directory permissions could not be changed.
'. 'Please CHMOD Joomla! files and directories manually.'; } } // if chmod wanted } else { ?>
"; ?> Joomla! - Web Installer
pre-installation check
license
step 1
step 2
step 3
step 4
Joomla! is Free Software released under the GNU/GPL License.