• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Install.php Schreibt die Config.php Nicht am ende.

Informatika

Neues Mitglied
Hallo :D
die install. php schreibt die config.php am ende nicht. Warum

inhalt der Install teil.1
PHP:
<?php

session_start();
$path = dirname(__FILE__);
//windows cleanup
if(strstr($path, '\install')){
    $path = str_replace('\\', '/', $path);
}
$path = str_replace('/install', '/', $path);

###loading ... default option & language
if(!isset($_REQUEST['op'])) $_REQUEST['op'] = 'start';
if(!isset($_SESSION['web']['lang'])) $_SESSION['web']['lang'] = 'english';
if(isset($_REQUEST['lang'])) $_SESSION['web']['lang'] = $_REQUEST['lang'];
###loading ... language
require_once ($path.'/install/lang/'.$_SESSION['web']['lang'].'.php');
function assoc_opt2($array, $value) {
    $return = '';
    foreach($array as $ky => $vl) {
            $return.= '<option value="'.$ky.'"';
            if($ky == $value) $return.= ' selected';
            $return.= '>'.$vl.'</option>';
    }
    return $return;
}
function array_opt2($array, $value) {
    $return = '';
    foreach($array as $vl) {
        $return.= '<option';
        if($vl == $value) $return.= ' selected';
        $return.= '>'.$vl.'</option>';
    }
    return $return;
}
function get_langs(){
    global $path;
    $langdir = $path.'lib/lang/';
    $dir = opendir($langdir);
    while($file = readdir($dir)){
        if($file!='.' && $file!='..' && $file!='readme.txt' && $file!='index.php' && !strstr($file,'countries')){
            $langs[$file] = substr($file,0,-4);
        }
    }
    return $langs;
}
?>
 
teil.2

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo XML_LANG; ?>" xml:lang="<?php echo XML_LANG; ?>">
<head>
    <title>KMleague</title>
    <meta http-equiv="content-type" content="text/html; charset=<?php echo ENCODING; ?>" />
    <meta name="Robots" content="index, follow, all" />
    <meta name="Revisit-After" content="1 days" />
    <meta name="Author" content="Krystian Zbikowski - KMprojekt" />
    <link rel="stylesheet" href="install.css" type="text/css" />
</head>
<body>

<div id="mainBody">
<div id="banner"><div id="flaga"><?php
if($_SESSION['web']['lang'] == 'english') {
    $flag = 'polski';
} else {
    $flag = 'english';
}
echo '<a  href="'.$_SERVER['PHP_SELF'].'?lang='.$flag.'&amp;op='.$_REQUEST['op'].'"><img  alt="flaga" src="im/lang_'.$flag.'.gif"/> '.$flag.'</a>';
?>
</div><img style="float: right;" alt="logo" src="im/logo.gif"/></div>
<div id="menu">
<?php
//feature options
//$options = array('start', 'install', 'update', 'import');
$options = array(
    'start',
    'install'
);
foreach($options as $vl) print('<a  href="index.php?lang='.$_SESSION['web']['lang'].'&amp;op='.$vl.'">'.$lang[$vl].'</a>');
?></div>
<div id="content">
 
PHP:
<?php
if(in_array($_REQUEST['op'], $options)) {
    if($_REQUEST['op'] == 'install') {
        if(!isset($_REQUEST['step'])) $_REQUEST['step'] = 1;
        #wykonywanie funkcji
        if(!isset($_POST['bk']) && !isset($_POST['skip'])) {
            if(isset($_POST['prival'])) $priv = '0'.$_POST['prival'];
            else $priv = '0';
            $fdir = array(
                $path.'files',
            );
            print('<div class="head1">'.$lang[$_REQUEST['op']].': '.$lang['istep_'.($_REQUEST['step']-1) ].' ['.($_REQUEST['step']-1) .'/4]</div>');
            $critical = 0;
            switch ($_REQUEST['step']) {
                case 1: {
                    foreach($fdir as $vl) {
                        if(!is_writable($vl)) {
                            if($critical != 1) print($lang['step_er1']);
                            $critical = 1;
                            print($vl.'<br/>');
                        }
                    }
                    if($critical == 1) print('<div class="bold">'.$lang['step_er12'].'</div>');
                    else print($lang['step_ok1']);
                    break;
                }
                case 2: {
                    $db = @mysql_connect($_POST['server'], $_POST['login'], $_POST['passw']);
                    if($db) $bd = @mysql_select_db($_POST['dbase']);
                    if($bd){//import information to database
                        $db_sqls = 'db2.sql';
                        if(file_exists($db_sqls)) {
                            $sql = file($db_sqls);
                            foreach($sql as $qry) {
                                $qry = str_replace('{prefix}', $_POST['prefix'], $qry);
                                if(!mysql_query(stripslashes($qry))) {
                                $critical = 1;
                                echo $qry.':'.mysql_error() .'<br/>'."\n";
                            }
                        }
                        print($lang['step_ok2'].'<br/>');
                        if($critical == 1) print($lang['step_er22']);
                        else print($lang['step_ok22']);
                        }else print($lang['step_er23']);
                    }else{
                        print($lang['step_er2']);
                        $critical = 1;
                    }
                    break;
                }
                case 3: {
                #create configuration file and add league to database
                    $fdata = "
 
PHP:
"<?php
#performance monitor (from ADOdb)
define('KML_DB_MONITOR', 0);
#error log, works just with PHP 5
define('KML_ERR_MONITOR', 0);
#log time required to generate each page
define('KML_CHECK_PERFORMANCE', 0);
#DataBase data
define('KML_DB_HOST', '".$_POST['server']."');
define('KML_DB_USER', '".$_POST['login']."');
define('KML_DB_PASSW', '".$_POST['passw']."');
define('KML_DB_NAME', '".$_POST['dbase']."');
define('KML_DB_TYPE', 'mysql');
#tables prefix
define('KML_PREFIX', '".$_POST['prefix']."');
#website main address
define('KML_WEBSITE', '".$_POST['website']."');
#cookie main address
define('KML_COOKIES', '".$_POST['cookies']."');
#authorization of accounts(admin approve: 2, mail authorization: 1, no authorization: 0)
define('KML_ACCOUNT_AUTH', '".$_POST['accounts_auth']."');
#turn 1-on/0-off registration
define('KML_REGISTRATION', 1);
#chmod which allow league script to remove files on server
define('KML_CHMOD', ".$priv.");
#e-mail address on which all db errors will be sent
define('KML_ERROR_MAIL', '[email protected]');
#default league id (set 0 ifyou have default page)
define('KML_DEFAULT_LEAGUE', 1);
#password changes and new accounts authorization expiration days
define('KML_CLEAN_REG_PAS', 3);
#limit to edit comments by users (no of days)
define('KML_COMMENTS_EDIT', 3);
#fix for wrong server time
define('KML_TIMEFIX',0);
#show awards from all leagues not only current
define('KML_AWARD_GLOBAL', 1);
#real remove account (not only mark as removed)
define('KML_REMOVE_REAL', 0);
#number of listed items per page (users, teams ..)
define('KML_ITEMS_PER_PAGE', 30);
#session hash to protect logins from different instance of script on same location
define('KML_SESSION_HASH', '_".substr(md5(time().$path),0,5)."');
?>
";
                    $lnk = fopen($path.'files/config.php', 'w+');
                    fwrite($lnk, $fdata);
                    fclose($lnk);
                    require_once($path.'files/config.php');
                    $db = @mysql_connect(KML_DB_HOST, KML_DB_USER, KML_DB_PASSW);
                    if($db) $bd = @mysql_select_db(KML_DB_NAME);
                    if($_POST['forum'] == '-') $_POST['forum'] = '';
                    if(!isset($_POST['lname'])) $_POST['lname'] = 'my league';
                    if(!isset($_POST['irc'])) $_POST['irc'] = '';
                    $qry = 'INSERT INTO '.KML_PREFIX.'_config (league, league_type, league_visible, league_name, league_address, league_irc, league_skin, league_language, league_show_flag, score_type, score_details, match_limit_group, team_limit, player_transfer, player_limit, player_type, signup_status, signup_limit_time, signup_limit_team, penalty_standard, poll_live_time, roster_dispute_after, roster_dispute_before, logo_small, logo_big, forum_type, forum_prefix, block_ident) VALUES("1", "'.$_POST['ltype'].'", "Y", "'.$_POST['lname'].'", "'.$_POST['website'].'", "'.$_POST['irc'].'", "default/", "'.$_POST['default_lang'].'", "Y", "'.$_POST['score'].'", "N", "2", "1", "Y", "10", "T", "E", NULL, "32", "S", "7", "14", "7", "", "", "'.$_POST['forum'].'", "'.$_POST['forum_prefix'].'", "N")';
                    if(!mysql_query($qry)){
                        $critical = 1;
                        echo $qry.':'.mysql_error() .'<br/>'."\n";
                    }
                    //create season
                    $qry = 'INSERT INTO `'.KML_PREFIX.'_season`(league, season_name, descr) VALUES(1, "first season", "first season")';
                    if(!mysql_query($qry)){
                        $critical = 1;
                        echo $qry.':'.mysql_error() .'<br/>'."\n";
                    }
                    //create menu
                    if($_POST['ltype'] == 'D') $status_pstats = 'N';
                    else $status_pstats = 'Y';
                    $forum_menu = '';
                    if(isset($_POST['forum_web']) && $_POST['forum_web'] != '') $forum_menu = ', ("1", "Y", "0", "0", "", "Forum", "'.$_POST['forum_web'].'", "N", "N", "0", "12")';
                    $qry = 'INSERT INTO '.KML_PREFIX.'_menu(league, visible, permission_global, permission_local, head_text, head_lang, link, link_target, link_local, sort_column, sort_row)
                    VALUES(1, "Y", 0, 0, "", "news", "index.php?", "S", "Y", 0, 1),
                    (1, "Y", 0, 0, "", "rules", "index.php?mod=content&view=rules", "S", "Y", 0, 2),
                    (1, "Y", 1, 0, "", "sign", "index.php?mod=leader&view=signup", "S", "Y", 0, 4),
                    (1, "Y", 0, 0, "", "teams", "index.php?mod=team&view=list", "S", "Y", 0, 3),
                    (1, "Y", 0, 0, "", "awards", "index.php?mod=team&view=awards", "S", "Y", 0, 5),
                      (1, "Y", 0, 0, "", "calendar", "index.php?mod=calendar&view=details", "S", "Y", 0, 6),
                    (1, "Y", 0, 0, "", "schedule", "index.php?mod=match&view=schedule", "S", "Y", 0, 6),
                    (1, "Y", 0, 0, "", "all_matches", "index.php?mod=match&view=list", "S", "Y", 0, 8),
                    (1, "Y", 0, 0, "", "cls_stats", "index.php?mod=stats&view=team", "S", "Y", 0, 7),
                    (1, "'.$status_pstats.'", 0, 0, "", "pls_stats", "index.php?mod=stats&view=players", "S", "Y", 0, 9),
                    (1, "Y", 0, 0, "", "lg_stats", "index.php?mod=stats&view=league", "S", "Y", 0, 10),
                    (1, "Y", 0, 0, "", "polls", "index.php?mod=poll&view=list", "S", "Y", 0, 13),
                    (1, "Y", 0, 0, "", "special_table", "index.php?mod=special&view=list", "S", "Y", 0, 14),
                    (1, "Y", 0, 0, "", "admin_team", "index.php?mod=user&view=admins", "S", "Y", 0, 15),
                    (1, "Y", 0, 0, "", "users", "index.php?mod=user&view=list", "S", "Y", 0, 16)'.$forum_menu;
                    if(!mysql_query($qry)){
                        $critical = 1;
                        echo $qry.':'.mysql_error() .'<br/>'."\n";
                    }
 
PHP:
                 //create directories structure
                    $dirs = array('article', 'award', 'category', 'data', 'league', 'league/logo_small', 'league/logo_big', 'media', 'media/demos', 'media/screen', 'player', 'team', 'team/logo', 'temp', 'temp/cache', 'user', 'user/avatar');
                    foreach($dirs as $dir){
                        //create directory
                        $dir = $path.'files/'.$dir;
                        if(!file_exists($dir)) mkdir($dir, KML_CHMOD);
                        //copy blank index file
                        if(!file_exists($dir.'/index.php')){
                            copy($path.'files/index.php', $dir.'/index.php');
//                            chmod($dir.'/index.php', KML_CHMOD);TODO I think that we dont need this one
                        }
                    }
                    $q[] ='INSERT INTO `'.KML_PREFIX.'_category` VALUES (1, 0, "news", "News", "", "article", "1", 5, "A"), (2, 0, "interview", "Interview", "", "article", "2", 10, "A")';
                    ###### USER
                    $q[] = "INSERT INTO `".KML_PREFIX."_field` ( `db_table` , `field_name` , `field_type` , `visible` , `header` , `header_lang` , `order_row` , `order_section` , `answer` , `answer_lang` , `value_unique` , `value_required` , `value_change` , `value_log`, value_default, field_search, field_list, field_important, field_auto_display, `extra1` , `extra2`, `value_create` )
                    VALUES
                    ('user', 'id_user', 'system', 'S', 'id_user', '', '0', '0', '', '', 'N', 'N', 'N', 'N', '', '', 'Y', 'Y', 'N', '', '', ''),
                    ('user', 'ip', 'system', 'S', 'ip', '', '0', '0', '', '', 'N', 'N', 'N', 'N', '', '', 'N', 'N', 'N', 'text', '', ''),
                    ('user', 'login', 'text', 'S', '', 'login', '1', '1', '', '', 'G', 'Y', 'N', 'N', '', 'U', 'Y', 'Y', 'N', '3', '15', ''),
                    ('user', 'user_name', 'text', 'S', '', 'name_surn', '9', '1', '', '', 'N', 'N', 'Y', 'N', '', 'U', 'Y', 'Y', 'N', '', '50', ''),
                    ('user', 'pass', 'password', 'S', '', 'password', '2', '1', '', '', 'N', 'Y', 'Y', 'N', '', '', '', '', 'N', '', 'approve', ''),
                    ('user', 'permission', 'select', 'S', '', 'grants', '3', '1', '', '0=blocked_account;1=user;2=admin;3=webmaster', 'N', 'N', 'N', 'Y', '1', '', 'Y', 'Y', 'Y', '5', '100', ''),
                    ('user', 'mail', 'mail', 'S', '', 'mail', '4', '1', '', '', 'G', 'Y', 'N', 'N', '', 'W', 'Y', '', 'Y', '5', '100', ''),
                    ('user', 'send_pm_mail', 'radio', 'S', '', 'send_pm_mail', '6', '1', '', 'Y=yes;N=no', 'N', 'N', 'Y', 'N', 'N', '', '', '', 'N', '', '1', ''),
                    ('user', 'mail_show', 'radio', 'S', '', 'show_mail', '7', '1', '', 'Y=mail_all;R=mail_reg;N=mail_hide', 'N', 'N', 'Y', 'N', 'N', '', 'Y', '', 'N', '', '1', ''),
                    ('user', 'timezone', 'timezone', 'S', '', 'timezone', '8', '1', '', '', 'N', 'N', 'Y', 'N', '0', '', '', '', 'N', '', '', ''),
                    ('user', 'user_country', 'country', 'S', '', 'country', '10', '1', '', '', 'N', 'N', 'Y', 'N', 'unknown', 'U', 'Y', 'Y', 'Y', '', '30', ''),
                    ('user', 'city', 'text', 'Y', '', 'city', '11', '1', '', '', 'N', 'N', 'Y', 'N', '', 'U', 'Y', '', 'Y', '', '40', ''),
                    ('user', 'birth', 'date', 'S', '', 'birth', '12', '1', '', '', 'N', 'N', 'Y', 'N', '', '', '', '', 'Y', '', '1940', ''),
                    ('user', 'team', 'text', 'Y', '', 'prof_team', '13', '1', '', '', 'N', 'N', 'Y', 'N', '', 'U', 'Y', '', 'N', '', '30', ''),
                    ('user', 'team_www', 'url', 'Y', '', 'team_site', '14', '1', '', '', 'N', 'N', 'Y', 'N', '', '', 'Y', '', 'N', '', '50', ''),
                    ('user', 'home_www', 'url', 'Y', '', 'website', '15', '1', '', '', 'N', 'N', 'Y', 'N', '', '', 'Y', 'N', 'N', '', '50', ''),
                    ('user', 'comm_icq', 'text', 'Y', 'ICQ', '', '16', '1', '', '', 'N', 'N', 'Y', 'N', '', '', 'Y', 'N', 'N', '', '30', ''),
                    ('user', 'comm_msn', 'text', 'Y', 'MSN', '', '17', '1', '', '', 'N', 'N', 'Y', 'N', '', '', 'Y', 'N', 'N', '', '30', ''),
                    ('user', 'info', 'text', 'Y', '', 'other_info', '18', '1', '', '', 'N', 'N', 'Y', 'N', '', '', '', '', 'Y', '', '250', ''),
                    ('user', 'avatar', 'file', 'Y', 'Avatar', '', '19', '1', '', 'gif;jpg;jpeg;png', 'N', 'N', 'Y', 'N', '', '', 'Y', 'Y', 'N', '20', '60:60', ''),
                    ('user', 'added', 'system', 'S', '', 'reg_date', '20', '1', '', '', 'N', 'N', 'N', 'N', '', '', 'N', 'N', 'Y', 'timestamp', '', ''),
                    ('user', 'lastlog', 'system', 'S', '', 'last_log', '21', '1', '', '', 'N', 'N', 'N', 'N', '', '', 'N', 'N', 'Y', 'timestamp', '', '')
                    ";
                    ### PLAYER
                    $q[] = "INSERT INTO `".KML_PREFIX."_field` ( `db_table` , `field_name` , `field_type` , `visible` , `header` , `header_lang` , `order_row` , `order_section` , `answer` , `answer_lang` , `value_unique` , `value_required` , `value_change` , `value_log`, value_default, field_search, field_list, field_important, field_auto_display, `extra1` , `extra2`, `value_create`)
                    VALUES
                    ('player', 'id_player', 'system', 'S', 'id_player', '', '0', '0', '', '', 'N', 'N', 'N', 'N', '', '', 'Y', 'Y', 'N', '', '', ''),
                    ('player', 'id_team', 'system', 'S', 'id_team', '', '0', '0', '', '', 'N', 'N', 'N', 'N', '', '', 'Y', 'Y', 'N', '', '', ''),
                    ('player', 'id_user', 'system', 'S', 'id_user', '', '0', '0', '', '', 'N', 'N', 'N', 'N', '', '', 'Y', 'Y', 'N', '', '', ''),
                    ('player', 'player_name', 'text', 'S', '', 'nick', '1', '1', '', '', 'N', 'Y', 'Y', 'Y', '', 'U', 'Y', 'Y', 'Y', '3', '15', ''),
                    ('player', 'grade', 'select', 'S', '', 'function', '2', '1', '', 'A=func_cl;B=func_war;C=team_member;D=team_recruit', 'N', 'N', 'Y', 'Y', 'D', 'U', 'Y', 'Y', 'Y', '', '1', ''),
                    ('player', 'contact', 'text', 'S', '', 'contact', '3', '1', '', '', 'N', 'N', 'Y', 'N', '', 'U', '', '', 'Y', '', '60', 'Y'),
                    ('player', 'ident', 'text', 'Y', 'ID', '', '4', '1', '', '', 'N', 'N', 'Y', 'Y', '', 'A', '', '', 'Y', '', '30', 'Y'),
                    ('player', 'other', 'text', 'Y', '', 'ply_other', '5', '1', '', '', 'N', 'N', 'Y', 'N', '', '', '', '', 'Y', '', '20', 'Y')";
                    ### TEAM
                    $q[] = "INSERT INTO `".KML_PREFIX."_field` ( `db_table` , `field_name` , `field_type` , `visible` , `header` , `header_lang` , `order_row` , `order_section` , `answer` , `answer_lang` , `value_unique` , `value_required` , `value_change` , `value_log`, value_default, field_search, field_list, field_important, field_auto_display, `extra1` , `extra2`, `value_create`)
                    VALUES
                    ('team', 'id_team', 'system', 'S', 'id_team', '', '0', '0', '', '', 'N', 'N', 'N', 'N', '', '', 'Y', 'Y', 'N', '', '', ''),
                    ('team', 'tag', 'text', 'S', '', 'tag', '1', '1', '', '', 'G', 'Y', 'N', 'N', '', 'U', 'Y', 'Y', 'Y', '', '15', ''),
                    ('team', 'team_name', 'text', 'S', '', 'name', '2', '1', '', '', 'G', 'Y', 'N', 'N', '', 'U', 'Y', 'Y', 'Y', '', '30', ''),
                    ('team', 'team_country', 'country', 'S', '', 'country', '3', '1', '', '', 'N', 'N', 'Y', 'N', 'unknown', 'U', 'Y', 'Y', 'Y', '', '', ''),
                    ('team', 'active', 'radio', 'S', '', 'active', '4', '1', '', 'Y=yes;N=no', 'N', 'N', 'Y', 'N', 'Y', '', 'Y', '', 'N', '', '1', ''),
                    ('team', 'www', 'url', 'Y', '', 'team_site', '5', '1', '', '', 'N', 'N', 'Y', 'N', '', '', 'Y', '', 'Y', '', '50', ''),
                    ('team', 'info', 'text', 'Y', '', 'other_info', '6', '1', '', '', 'N', 'N', 'Y', 'N', '', '', '', '', 'Y', '', '200', ''),
                    ('team', 'irc_channel', 'text', 'Y', '', 'irc_channel', '7', '1', '', '', 'N', 'N', 'Y', 'N', '', '', '', '', 'Y', '', '50', ''),
                    ('team', 'team_pass', 'password', 'S', '', 'team_join_passw', '8', '1', '', '', 'N', 'N', 'Y', 'N', '', '', '', '', 'N', '', '', ''),
                    ('team', 'logo', 'file', 'Y', '', 'team_logo', '9', '2', '', 'gif;jpg;jpeg;png', 'N', 'N', 'Y', 'N', '', '', '', '', 'N', '200', '', '')";
                    $q[] = 'INSERT INTO '.KML_PREFIX.'_field_league(id_field, league) SELECT id_field, "1" FROM '.KML_PREFIX.'_field';
                    foreach($q as $k=>$qry){
                        if(!mysql_query($qry)){
                            $critical = 1;
                            echo $qry.':'.mysql_error() .'<br/>'."\n";
                        }
                    }
                    if($critical == 1) print($lang['step_er3']);
                    else print($lang['step_ok3']);
                    break;
                }
 
Moment, Moment. Bevor du jetzt das gesamte Script (wahrscheinlich von hier: KMleague - php online league & tournament script) postest, teile uns lieber die aufgetretene Fehlermeldung mit.

Falls es keine Fehlermeldung gab, überprüfe, ob das Script Schreibrechte für den entsprechenden Ordner hat, in dem die Datei erstellt werden soll.

Und lies eine etwaige Anleitung/Readme-Datei.
 
PHP:
            case 4: {
                    require_once ($path.'files/config.php');
                    $db = @mysql_connect(KML_DB_HOST, KML_DB_USER, KML_DB_PASSW);
                    if($db) $bd = @mysql_select_db(KML_DB_NAME);
                    $qry = 'INSERT INTO '.KML_PREFIX.'_user(id_user, login, pass, mail, permission, added, mail_show, ip, user_country) VALUES(1, "website", "", "'.$_POST['na_email'].'", "-1", NOW(), "N", "", "unknown"), (2, "removed", "", "", "-1", NOW(), "N", "", "unknown"), (5, "'.$_POST['na_login'].'", "'.md5($_POST['na_passw']) .'", "'.$_POST['na_email'].'", 3, NOW(), "N", "'.$_SERVER['REMOTE_ADDR'].'", "unknown")';
                    if(!mysql_query($qry)){
                        $critical = 1;
                        echo $qry.':'.mysql_error() .'<br/>'."\n";
                    }
                    //TODO fix this one, how?
//                    if($critical != 1) {
//                        reg_forum(5);
//                    }
                    if($critical == 1) print($lang['step_er4']);
                    else print($lang['step_ok4']);
                }
            }
            print('<br/><br/>');
        }
        if(($critical != 1 && !isset($_POST['bk'])) || (isset($_REQUEST['step']) && $_REQUEST['step'] == 1)) $stepH = $_REQUEST['step'];
        else $stepH = $_REQUEST['step']-1;
        if(isset($_POST['bk'])) $stepH-= 1;
        print('<form action="'.$_SERVER['PHP_SELF'].'?lang='.$_SESSION['web']['lang'].'&amp;op=install" method="post">');
        print('<div class="head1">'.$lang[$_REQUEST['op']].': '.$lang['istep_'.$stepH].' ['.$stepH.'/4]</div>');
        #wyswietlenie formularzy
        switch ($stepH) {
            case 1: {
                $back = 1;
                if(!isset($_POST['server'])) $_POST['server'] = 'localhost';
                if(!isset($_POST['prefix'])) $_POST['prefix'] = 'kml';
                if(!isset($_POST['login'])) $_POST['login'] = 'root';
                if(!isset($_POST['passw'])) $_POST['passw'] = '';
                if(!isset($_POST['dbase'])) $_POST['dbase'] = 'test';
                echo '<div class="formH">'.$lang['server'].':</div><input type="text" name="server" value="'.$_POST['server'].'"/><br/>
                <div class="formH">'.$lang['db_login'].':</div><input type="text" name="login" value="'.$_POST['login'].'"/><br/>
                <div class="formH">'.$lang['db_passw'].':</div><input type="password" name="passw" value="'.$_POST['passw'].'"/><br/>
                <div class="formH">'.$lang['dbase'].':</div><input type="text" name="dbase" value="'.$_POST['dbase'].'"/><br/>
                <div class="formH">'.$lang['prefix'].':</div><input type="text" name="prefix" value="'.$_POST['prefix'].'"/><br/>';
                break;
            }
            case 2: {
                $onoff = array(
                        2 => $lang['auth_admin'],
                        1 => $lang['auth_mail'],
                        0 => $lang['off']
                );
                $langs = get_langs();
                $chmod = array(
                        '755' => $lang['standard'],
                        '777' => $lang['maximum']
                );
                $ltype = array(
                        'T' => $lang['team'],
                        'D' => $lang['duel']
                );
                $score = array(
                        'M' => $lang['map_score'],
                        'R' => $lang['round_score']
                );
                $forum = array(
                        '-',
                        'phpBB'
                );
                $yesno = array(
                        '0' => $lang['yes'],
                        '1' => $lang['no']
                );
                $wurl = $_SERVER['HTTP_REFERER'];
                $wurl = substr($wurl, 0, strpos($wurl,'/install/'));
                if(!isset($_POST['website'])) $_POST['website'] = $wurl.'/';
                if(!isset($_POST['cookies'])) $_POST['cookies'] = $_SERVER['HTTP_HOST'];
                if(!isset($_POST['forum_prefix'])) $_POST['forum_prefix'] = '';
                if(!isset($_POST['forum_web'])) $_POST['forum_web'] = '';
                print('<div class="head2">'.$lang['global_settings'].'</div>
                <div class="formH">*'.$lang['website'].':</div><input type="text" name="website" value="'.$_POST['website'].'" style="width: 200px;"/><br/>
                <div class="formH">**'.$lang['cookies'].':</div><input type="text" name="cookies" value="'.$_POST['cookies'].'"/><br/>
                <div class="formH">'.$lang['accounts_auth'].':</div><select name="accounts_auth">'.assoc_opt2($onoff, isset($_POST['accounts_auth']) ? $_POST['accounts_auth'] : '1') .'</select><br/>
                <div class="formH">***'.$lang['prival'].':</div><select name="prival">'.assoc_opt2($chmod, isset($_POST['prival']) ? $_POST['prival'] : '') .'</select><br/><br/>
                * - '.$lang['league_web_info'].'<br/>
                ** - '.$lang['cookies_info'].'<br/>
                *** - '.$lang['prival_info'].'<br/><br/>
                <div class="head2">'.$lang['league_settings'].'</div>
                <div class="formH">'.$lang['default_lang'].':</div><select name="default_lang">'.array_opt2($langs, isset($_POST['default_lang']) ? $_POST['default_lang'] : 'us_english') .'</select><br/>
                <div class="formH">'.$lang['ltype'].':</div><select name="ltype">'.assoc_opt2($ltype, isset($_POST['ltype']) ? $_POST['ltype'] : '') .'</select><br/>
                <div class="formH">'.$lang['match_score'].':</div><select name="score">'.assoc_opt2($score, isset($_POST['score']) ? $_POST['score'] : '') .'</select><br/><br/>
                <!--
                <div class="head2">'.$lang['forum_settings'].'</div>
                <div class="formH">'.$lang['forum'].':</div><select name="forum">'.array_opt2($forum, isset($_POST['forum']) ? $_POST['forum'] : '') .'</select><br/>
                <div class="formH">'.$lang['forum_prefix'].':</div><input type="text" name="forum_prefix" value="'.$_POST['forum_prefix'].'" style="width: 200px;"/><br/>
                <div class="formH">'.$lang['forum_web'].':</div><input type="text" name="forum_web" value="'.$_POST['forum_web'].'" style="width: 200px;"/><br/><br/>
                '.$lang['forum_info'].'<br/>-->
                ');
                break;
            }
 
ja das ist es ja es gipt keine meldung es kommt nur es ist fertig soll die install so wie ordner löschen und die seite aufruffen

schau selbst http://gameing.biz ich lade ebend die install rein und den fürst du die install mal aus kanst ja irgendwas eintragen,
den weiste was ich meine.

die Anleitung/Readme-Datei gips nicht, also ist nicht vorhanden
und die das machen von denen ist irgend wie auf 3 verschidene server:TeamSpeak 2,TeamSpeak 3 Client so wie Mumble kerner Online der plan hat.

jemand könte mir ja helfen Bastor aber der ist ja auch nie da ;-)

da her suche ich euch auf mir bei dem problem zu helfen
ich trage alles sauber ein von a-z und am ende soll ich den ortner löschen
ich soll den die hp besuchen und schon ist es install geschehen.

die install lecht mir keine config an und das ist glaube ich auch das problem.

köntet ihr mir sagen warum die install die config nicht anlegen tut
und wen bitte gleichauch welche ordner rechte bekommt,
den ich glaube das ist auch vileicht der prob,

nur ich habe alle ortner schon mall alle rechte ge geben um zu schaun ob es daran licht
aber auch da hat die install keine config angelegt
von da her schlisse ich den prob aus.

ich hoffe ihr könt mir helfen ich hocke schon nee weile da vor um genau zu sagen fast schon monate das es get
aber der eigendlich hilfe punkt ist wull verreist oder soga ausgewandert.

LG Manuel aka Informatika
 
Zuletzt bearbeitet:
PHP:
case 3: {
                if(!isset($_POST['na_login'])) $_POST['na_login'] = '';
                if(!isset($_POST['na_passw'])) $_POST['na_passw'] = '';
                if(!isset($_POST['na_email'])) $_POST['na_email'] = '';
                print('<div class="formH">'.$lang['login'].':</div><input type="text" name="na_login" value="'.$_POST['na_login'].'"/><br/>
                <div class="formH">'.$lang['passw'].':</div><input type="password" name="na_passw" value="'.$_POST['na_passw'].'"/><br/>
                <div class="formH">'.$lang['email'].':</div><input type="text" name="na_email" value="'.$_POST['na_email'].'"/><br/>');
                break;
            }
            case 4: {
                print($lang['step4_info'].'<br/><a href="../index.php">'.$lang['go_website'].'</a><br/>');
                break;
            }
        }
        print('<br/>');
        if($stepH > 2) print('<input type="hidden" name="prival" value="'.$_POST['prival'].'"/>');
        if($stepH < 4) print('<input type="submit" name="go" value="'.$lang['next'].' &raquo;"/> &nbsp; &nbsp; <input type="submit" name="skip" value="'.$lang['skip'].' &raquo;&raquo;"/>  &nbsp; &nbsp; ');
        if($stepH > 1) print('<input type="submit" name="bk" value="&laquo; '.$lang['back'].'"/> <input type="hidden" name="server" value="'.$_POST['server'].'"/><input type="hidden" name="login" value="'.$_POST['login'].'"/><input type="hidden" name="passw" value="'.$_POST['passw'].'"/><input type="hidden" name="dbase" value="'.$_POST['dbase'].'"/><input type="hidden" name="prefix" value="'.$_POST['prefix'].'"/>');
        print('<input type="hidden" name="step" value="'.($stepH+1) .'"/>
        </form>');
    }else{
        print('<div class="head1">'.$lang[$_REQUEST['op']].'</div>');
        print($lang['install_welcome']);
    }
}else{
    echo 'start';
}
?>
 
Also, wenn ich das richtig sehe, wird $path hier definiert:

Code:
$path = dirname(__FILE__);
//windows cleanup
if (strstr($path, '\install')) {
    $path = str_replace('\\', '/', $path);
}
$path = str_replace('/install', '/', $path);

dirname(__FILE__) ist das Verzeichnis, aus dem du das Installationsscript aufrufst. Die Zeilen darunter entfernen einen Pfadanteil "/install" daraus, sofern vorhanden.

Die Datei die geschrieben werden soll, ist:

Code:
$path . 'files/config.php';

Das wäre also ein Unterverzeichnis "files" im Verzeichnis $path.

Beispiel:

Rufst du das Installationsscript als "[example.org]/install/install.php" auf, wäre das Verzeichnis "[example.org]/files".

Die Rechte dieses Verzeichnisses auf dem Webserver musst du auf zum Beispiel 0777 setzen.

PS: Dein Post ist kaum zu entziffern. Satzzeichen, Groß-/Kleinschreibung und bessere Rechtschreibung sind überaus wünschenswert. Du machst es dir sonst unnötig schwer, Hilfe zu bekommen.
 
Die config.php wird nun ge schriben nur es stümmt nicht der inhalt es kommt immer die DB ist nicht zu ereichen

da bei habe in der install alles an gegeben was not war und wen die install fertig ist ist die cfg da nur der hinhalt stümmt nicht
warum schreibt die install den inhalt den ich bei der installazion eintrage nicht in die cfg ?

rechte wie 0777 hat der Ordner so wie der inhalt
 
Da wendest du dich am besten an den Autor des Scripts oder wartest, bis dein "Spezi" wieder da ist. Wir hier im Forum sind nicht in der besten Position, dir dabei genauer helfen zu können.

Aus Erfahrung kann ich dir nur sagen, dass es *vermutlich* nicht am Script selbst liegt (sonst hätten sich vermutlich schon mehr Leute beschwert), sondern an einer Einstellungssache oder falscher Vorgehensweise bei der Einrichtung oder falscher Angabe von Zugangsdaten oder so.
 
Zurück
Oben