// Only pertinent if mirroring another installation directory if (!empty($installer->source_site_id)) { echo "Creating site directory..."; if (!$installer->create_site_directory()) { echo $installer->error_message; break; } else { echo "OK.<BR>"; flush(); } } // Skip below if database shell has already been created. if ($inst != 2) { echo "Creating database...\n"; flush(); if (!$installer->create_database()) { echo "ERROR. Check your login credentials.\n"; echo $installer->error_message; break; } else { echo "OK.<br>\n"; flush(); } echo "Creating user with permissions for database...\n"; flush(); if (!$installer->grant_privileges()) { echo "ERROR when granting privileges to the specified user.\n"; echo $installer->error_message; break; } else { echo "OK.<br>\n";
<input type="submit" class="btn btn-primary" name="start" value="<?php _e('Start install', 'luna'); ?> " /> </div> </div> </form> </div> </body> </html> <?php } else { // Enable/disable avatars depending on file_uploads setting in PHP configuration $avatars = in_array(strtolower(@ini_get('file_uploads')), array('on', 'true', '1')); // Create the tables $db = Installer::create_database($db_type, $db_host, $db_name, $db_username, $db_password, $db_prefix, $title, $description, $default_lang, $default_style, $email, $avatars, $base_url); // Insert some other default data Installer::insert_default_groups(); // groups Installer::insert_default_users($username, $password1, $email, $default_lang, $default_style); // users Installer::instert_default_menu(); // menus Installer::insert_default_data(); // other stuff, like ranks $alerts = array(); // Check if we disabled uploading avatars because file_uploads was disabled if (!$avatars) { $alerts[] = __('<strong>File uploads appear to be disallowed on this server!</strong> If you want users to be able to upload their own avatar images you must enable the file_uploads configuration setting in PHP. Once file uploads have been enabled, avatar uploads can be enabled in Administration/Options/Features.', 'luna'); } // Generate the config.php file data