1. GSManager
    1. Funktionen
    2. Unterstützte Spiele
    3. Neuigkeiten
    4. Statistiken
    5. Serverliste
  2. Lexikon
  3. Filebase
  4. Entwicklung
  5. Forum
    1. Dashboard
    2. Unerledigte Themen
  6. Web-Interface
  7. Artikel
  8. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  • Deutsch
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  1. GSManager
  2. Forum
  3. Unterstützung
  4. Installation

PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()

  • Angel
  • 4. Januar 2011 um 12:19
Das Projekt GSManager (vormals ManuAdminMod) wurde am 01.01.2020 eingestellt - diese Internetpräsenz bleibt verfügbar, die Software wird aber nicht länger gepflegt. Vielen Dank für eure Unterstützung in den mehr als zehn vergangenen Jahren!
  • Angel
    Anfänger
    Punkte
    80
    Beiträge
    12
    • 4. Januar 2011 um 12:19
    • #1

    hallo was meint dr mod damit ich kann nichts damit anfangen bitte um helfe


    0:00 [04.01.11 11:30:23] Notice: ==========================================
    0:00 [04.01.11 11:30:23] Notice: Manu-Admin-Mod v0.11.3 beta is starting...
    0:00 [04.01.11 11:30:23] Notice: ==========================================
    0:00 [04.01.11 11:30:23] Notice: !! Please wait until the mod is completely initialised
    0:00 [04.01.11 11:30:23] Notice: Config loaded: config.cfg
    0:00 [04.01.11 11:30:23] Notice: Config loaded: plugins/serverinfo.cfg
    0:00 [04.01.11 11:30:23] Notice: Config loaded: maps.cfg
    0:00 [04.01.11 11:30:23] Notice: Config loaded: admins.cfg
    0:00 [04.01.11 11:30:23] Notice: Config loaded: groups.cfg
    0:00 [04.01.11 11:30:23] Notice: Config loaded: reasons.cfg
    0:00 [04.01.11 11:30:23] Notice: Language files loaded: de
    0:00 [04.01.11 11:30:23] Notice: All config files were parsed
    0:00 [04.01.11 11:30:24] Notice: RCON connection established (87.118.86.34:28960)
    0:00 [04.01.11 11:30:24] Notice: Game detected: Call of Duty 4
    0:00 [04.01.11 11:30:25] Notice: Dvar check successful
    0:00 [04.01.11 11:30:26] Notice: Synced playerlist with 'status'
    0:00 [04.01.11 11:30:26] Notice: Updated Dvar g_gametype
    0:00 [04.01.11 11:30:27] Notice: Updated teamnames (sas vs. ussr)
    0:00 [04.01.11 11:30:28] Notice: Sets Dvar _manuadminmod to '0.11.3 beta'
    0:00 [04.01.11 11:30:28] Notice: == Loading plugins and commands ==
    0:00 [04.01.11 11:30:28] Notice: - Loading antiaimbot.php
    0:00 [04.01.11 11:30:28] Notice: - Loading antiteamkiller.php
    0:00 [04.01.11 11:30:28] Notice: - Loading badwords.php
    0:00 [04.01.11 11:30:28] Notice: - Loading banner.php
    0:00 [04.01.11 11:30:28] Notice: - Loading basiccommands.php
    0:00 [04.01.11 11:30:28] Notice: - Loading chatlog.php
    0:00 [04.01.11 11:30:28] Notice: - Loading customcommands.php
    0:00 [04.01.11 11:30:28] Notice: - Loading funmessages.php
    0:00 [04.01.11 11:30:28] Notice: - Loading logkickbans.php
    0:00 [04.01.11 11:30:28] Notice: - Loading mapvote.php
    0:00 [04.01.11 11:30:28] Notice: - Loading modstuff.php
    0:00 [04.01.11 11:30:28] Notice: Heartbeat has been sent to serverlist at manuadminmod.de: Couldn't resolve hostname
    0:00 [04.01.11 11:30:28] Notice: - Loading nameprotection.php
    0:00 [04.01.11 11:30:28] Notice: - Loading pingkicker.php
    0:00 [04.01.11 11:30:28] Notice: - Loading punkbuster.php
    0:00 [04.01.11 11:30:29] Notice: - Loading randommapcycle.php
    0:00 [04.01.11 11:30:29] Notice: - Loading serverinfo.php
    0:00 [04.01.11 11:30:29] Notice: - Loading serverrules.php
    0:00 [04.01.11 11:30:29] Notice: - Loading spreemessages.php
    0:00 [04.01.11 11:30:29] Notice: - Loading statistics.php
    0:00 [04.01.11 11:30:29] Notice: - Loading tcp_query.php
    0:00 [04.01.11 11:30:29] Notice: - Loading voting.php
    0:00 [04.01.11 11:30:29] Notice: - Loading warns.php
    0:00 [04.01.11 11:30:29] Notice: - Loading weaponrestrictions.php
    0:00 [04.01.11 11:30:29] Notice: - Loading welcomemessages.php
    0:00 [04.01.11 11:30:29] Notice: == Finished loading plugins ==
    0:00 [04.01.11 11:30:29] Notice: !! Finished initialisation
    0:00 [04.01.11 11:30:29] Notice: === Start processing loglines... ===
    0:00 [04.01.11 11:30:31] Notice: Banner message was sent: ^2Next map is: ^7unknown (unknown)
    1958:30 [04.01.11 11:32:33] Notice: Banner message was sent: ^2Play fair and have fun{{br}}^2Spielt fair und habt Spaß
    1960:32 [04.01.11 11:34:34] Notice: Banner message was sent: ^1Den Admins ist immer folge zu leisten, tut man das nicht, führt dies zu einem Kick oder Ban!!!!!!
    1961:13 [04.01.11 11:35:14] Notice: TCP-Query: New connection from 91.37.155.76 on port 49553
    1961:19 [04.01.11 11:35:21] Notice: TCP-Query: User logged in: Miau (91.37.155.76:49553)
    1962:31 [04.01.11 11:36:35] Notice: Banner message was sent: ^1Serverrules bekommt ihr under (!rules) eingabe!!!!
    1964:34 [04.01.11 11:38:37] Notice: Banner message was sent: ^2Next map is: ^7unknown (unknown)
    1966:20 [04.01.11 11:40:22] Notice: Next map / map restart
    1966:20 [04.01.11 11:40:22] Notice: RCON connection established (87.118.86.34:28960)
    1966:20 [04.01.11 11:40:22] Notice: Current map: mp_backlot (war)
    1966:20 [04.01.11 11:40:26] Notice: Updated teamnames (usmc vs. arab)
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()
    1966:20 [04.01.11 11:40:26] PHP-Error: Warning in functions.php:168 => Invalid argument supplied for foreach()

  • Mirko911
    Entwickler
    Reaktionen
    165
    Punkte
    16.820
    Trophäen
    6
    Beiträge
    3.263
    Einträge
    11
    • 4. Januar 2011 um 18:16
    • #2

    glaube irgendwas ist mit deinen PFaden im startscript nicht richtig

    für alle die es interessiert ist es die Function

    PHP
    function config_merge($config1, $config2) {
    	$configs = func_get_args();
    	$result = array_shift($configs);
    
    
    
    
    	foreach ($configs as $config) {
        	foreach ($config as $sectionname => $section) {
            	foreach ($section as $key => $value) {
                	$result[$sectionname][$key] = $value;
                	if ($value == null) {
                    	unset($result[$sectionname][$key]);
                	}
            	}
        	}
    	}
    
    
    
    
    	return $result;
    }
    Alles anzeigen
  • Angel
    Anfänger
    Punkte
    80
    Beiträge
    12
    • 5. Januar 2011 um 17:33
    • #3

    ja danke erst mal aber wo ist das Problem jetzt ich weiß nicht was da falsch sein soll

    Spoiler anzeigen

    <?php

    //Funktionen
    function makeuptime($time) //Generiert aus Minuten Tage, Stunden und Minuten
    {
    $minuten = $time % 60;
    $weiter = ($time - $minuten) / 60;
    $stunden = $weiter % 24;
    $tage = ($weiter - $stunden) / 24;
    return sprintf("%dD %02d:%02d", (int)$tage, (int)$stunden, (int)$minuten);
    }

    function makeuptime2 ($time) //Generiert aus Sekunden Stunden, Minuten und Sekunden
    {
    $sekunden = $time % 60;
    $weiter = ($time - $sekunden) / 60;
    $minuten = $weiter % 60;
    $stunden = ($weiter - $minuten) / 60;
    return sprintf("%02d:%02d:%02d", (int)$stunden, (int)$minuten, (int)$sekunden);
    }

    function __autoload($class_name) {
    require_once "classes/" . $class_name . '.class.php';
    }

    function error_handler($errno, $errstr, $errfile, $errline) {
    global $logging;

    if (error_reporting() == 0) return;

    $errortype = array (
    E_ERROR => 'Error',
    E_WARNING => 'Warning',
    E_PARSE => 'Parsing Error',
    E_NOTICE => 'Notice',
    E_CORE_ERROR => 'Core Error',
    E_CORE_WARNING => 'Core Warning',
    E_COMPILE_ERROR => 'Compile Error',
    E_COMPILE_WARNING => 'Compile Warning',
    E_USER_ERROR => 'User Error',
    E_USER_WARNING => 'User Warning',
    E_USER_NOTICE => 'User Notice',
    E_STRICT => 'Runtime Notice',
    E_RECOVERABLE_ERROR => 'Catchable Fatal Error'
    );

    $dir = dirname(__FILE__);
    $errfile = substr(str_replace($dir, "", $errfile), 1);

    $logging->write(MOD_PHPERROR, "$errortype[$errno] in $errfile:$errline => $errstr");
    }

    function parse_cfg_file($file, $process_sections = false) {
    global $logging;

    $process_sections = ($process_sections !== true) ? false : true;

    $ini = file($file);
    if (count($ini) == 0) {return array();}

    $sections = array();
    $values = array();
    $result = array();
    $globals = array();
    $i = 0;
    $lineno = 0;
    foreach ($ini as $line) {
    $lineno ++;
    $line = trim($line);
    $line = str_replace("\t", " ", $line);

    // Comments
    if (!preg_match('/^[a-zA-Z0-9[-]/', $line)) {
    if (!empty($line) && $line{0} != ";") { //Not a Comment
    $logging->write(MOD_ERROR, "Parse error in $file on line $lineno");
    }
    continue;
    }

    // Sections
    if ($line{0} == '[') {
    $tmp = explode(']', $line);
    $sections[] = trim(substr($tmp[0], 1));
    $i++;
    continue;
    }

    // Key-value pair
    $parts = explode('=', $line, 2);
    if (count($parts) != 2) {
    $logging->write(MOD_ERROR, "Parse error in $file on line $lineno");
    }
    list($key, $value) = $parts;
    $key = trim($key);
    $value = trim($value);

    if (strtolower($value) == "null") {
    $value = null;
    }
    else {
    if (strstr($value, ";")) {
    $tmp = explode(';', $value);
    if (count($tmp) == 2) {
    if ((($value{0} != '"') && ($value{0} != "'")) ||
    preg_match('/^".*"\s*;/', $value) || preg_match('/^".*;[^"]*$/', $value) ||
    preg_match("/^'.*'\s*;/", $value) || preg_match("/^'.*;[^']*$/", $value) ){
    $value = $tmp[0];
    }
    } else {
    if ($value{0} == '"') {
    $value = preg_replace('/^"(.*)".*/', '$1', $value);
    } elseif ($value{0} == "'") {
    $value = preg_replace("/^'(.*)'.*/", '$1', $value);
    } else {
    $value = $tmp[0];
    }
    }
    }
    $value = trim($value);
    $value = trim($value, "'\"");
    }

    if ($i == 0) {
    if (substr($line, -1, 2) == '[]') {
    $globals[$key][] = $value;
    } else {
    $globals[$key] = $value;
    }
    } else {
    if (substr($line, -1, 2) == '[]') {
    $values[$i-1][$key][] = $value;
    } else {
    $values[$i-1][$key] = $value;
    }
    }

    }

    for($j = 0; $j < $i; $j++) {
    if ($process_sections === true) {
    $result[$sections[$j]] = $values[$j];
    } else {
    $result[] = $values[$j];
    }
    }

    return $result + $globals;
    }

    function size($size)
    {
    $sizes = Array('Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');
    $ext = $sizes[0];
    for ($i=1; (($i < count($sizes)) && ($size >= 1024)); $i++) {
    $size = $size / 1024;
    $ext = $sizes[$i];
    }
    $size = round($size, 2) . ' ' . $ext;
    return $size;
    }

    function config_merge($config1, $config2) {
    $configs = func_get_args();
    $result = array_shift($configs);

    foreach ($configs as $config) {
    foreach ($config as $sectionname => $section) {
    foreach ($section as $key => $value) {
    $result[$sectionname][$key] = $value;
    if ($value == null) {
    unset($result[$sectionname][$key]);
    }
    }
    }
    }

    return $result;
    }

    function array_i_key_exists($needle, $stack) {
    $needle = strtolower($needle);
    $keys = array_keys($stack);
    $keys = array_map("strtolower", $keys);
    return (in_array($needle, $keys));
    }

    function parse_argv() {
    $possible = array(
    "force" => array("count" => 2, "multiple" => true),
    "configdir" => array("count" => 1, "multiple" => false),
    "logdir" => array("count" => 1, "multiple" => false),
    "splitlog" => array("count" => 1, "multiple" => false),
    "usemysql" => array("count" => 5, "multiple" => false),
    );

    global $argv, $argc;

    $parsed = array();

    for ($i = 1; $i < $argc; $i ++) {
    if ($argv[$i]{0} != "-" && $argv[$i]{0} != "/") {
    throw new Exception("Unrecognized part '$argv[$i]'");
    }

    $name = strtolower(substr($argv[$i], 1));
    if (!array_key_exists($name, $possible)) {
    throw new Exception("Unrecognized parameter '$argv[$i]'");
    }

    if (array_key_exists($name, $parsed) && !$possible[$name]["multiple"]) {
    throw new Exception("'$name' can't be set multiple times");
    }

    $values = array();
    for ($j = 1; $j <= $possible[$name]["count"]; $j++, $i++) {

    if (!isset($argv[$i + 1])) {
    throw new Exception("Wrong parameter count for '$name'");
    }

    if ($possible[$name]["count"] == 1) {
    $values = $argv[$i + 1];
    }
    else {
    $values[] = $argv[$i + 1];
    }
    }

    if ($possible[$name]["multiple"]) {
    if (!array_key_exists($name, $parsed)) {
    $parsed[$name] = array();
    }
    $parsed[$name][] = $values;
    }
    else {
    $parsed[$name] = $values;
    }

    }

    return $parsed;

    }

    ?>

  • Dieses Thema enthält 3 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind.

Benutzer online in diesem Thema

  • 1 Besucher
  1. Mitarbeiter
  2. Datenschutzerklärung
  3. Nutzungsbedingungen
  4. Impressum
  5. Kontakt
Community-Software: WoltLab Suite™
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Dateien
  • Forum
  • Lexikon
  • Erweiterte Suche
  • Deutsch
  • English
Zitat speichern