Error when registering! Offset: 8192

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Error when registering! Offset: 8192

      Hi. This happens when correctly registering. I have no clue where to look and what to do at this point.


      Fatal error: Uncaught exception 'ErrorException' with message 'Undefined offset: 8192' in /home/meladze/public_html/includes/GeneralFunctions.php:891Stack trace:#0 /home/meladze/public_html/includes/GeneralFunctions.php(891): errorHandler(8, 'Undefined offse...', '/home/meladze/p...', 891, Array)#1 [internal function]: exceptionHandler(Object(ErrorException))#2 {main} thrown in /home/meladze/public_html/includes/GeneralFunctions.php on line 891
    • PHP Source Code

      1. ob_start();
      2. echo '<!DOCTYPE html>
      3. <!--[if lt IE 7 ]> <html lang="de" class="no-js ie6"> <![endif]-->
      4. <!--[if IE 7 ]> <html lang="de" class="no-js ie7"> <![endif]-->
      5. <!--[if IE 8 ]> <html lang="de" class="no-js ie8"> <![endif]-->
      6. <!--[if IE 9 ]> <html lang="de" class="no-js ie9"> <![endif]-->
      7. <!--[if (gt IE 9)|!(IE)]><!--> <html lang="de" class="no-js"> <!--<![endif]-->
      8. <head>
      9. <title>'.$gameName.' - '.$errorType[$errno].'</title>
      10. <meta name="generator" content="2Moons '.$VERSION.'">
      11. <!--
      12. This website is powered by 2Moons '.$VERSION.'
      13. 2Moons is a free Space Browsergame initially created by Jan Kr�pke and licensed under GNU/GPL.
      14. 2Moons is copyright 2009-2013 of Jan Kröpke. Extensions are copyright of their respective owners.
      15. Information and contribution at http://2moons.cc/
      16. -->
      Display All
    • I don't really know. It's public jeremy's xterium version. 1.7.x I guess. Everything was working normally but one day I noticed that there are no new players for a pretty long time so I checked registration and it threw this error.
    • if you can click on registration but u get the error when submitting.......Make sure u didn't edit anything....( If you did I'll get to that).....In the admin settings under server make sure recaptcha is not active if it is you will get an error....If you did edit anything in the login and don't know how to fix for what was edited just take the login from the ear or zip file you got and reupload to the respective locations.......Includes/login......And styles/template/login......Their is a script folder but if you didn't edit anything their then leave it....... Xterium is a great version of 2moons.... But it does come with its bugs.....U should have a backup directory on your server... When you edit anything do it their devote you implement anything on your live version....Hope that helped
    • Meladze wrote:

      Hi. This happens when correctly registering. I have no clue where to look and what to do at this point.


      Fatal error: Uncaught exception 'ErrorException' with message 'Undefined offset: 8192' in /home/meladze/public_html/includes/GeneralFunctions.php:891Stack trace:#0 /home/meladze/public_html/includes/GeneralFunctions.php(891): errorHandler(8, 'Undefined offse...', '/home/meladze/p...', 891, Array)#1 [internal function]: exceptionHandler(Object(ErrorException))#2 {main} thrown in /home/meladze/public_html/includes/GeneralFunctions.php on line 891
      this error is the errormessage of the errorhandler of 2moons
      to fix all errors not defined and see the stacktrace
      find
      in file includes/generalfunctions.php

      PHP Source Code

      1. $errorType = array(
      2. E_ERROR => 'ERROR',
      3. E_WARNING => 'WARNING',
      4. E_PARSE => 'PARSING ERROR',
      5. E_NOTICE => 'NOTICE',
      6. E_CORE_ERROR => 'CORE ERROR',
      7. E_CORE_WARNING => 'CORE WARNING',
      8. E_COMPILE_ERROR => 'COMPILE ERROR',
      9. E_COMPILE_WARNING => 'COMPILE WARNING',
      10. E_USER_ERROR => 'USER ERROR',
      11. E_USER_WARNING => 'USER WARNING',
      12. E_USER_NOTICE => 'USER NOTICE',
      13. E_STRICT => 'STRICT NOTICE',
      14. E_RECOVERABLE_ERROR => 'RECOVERABLE ERROR'
      15. );
      Display All


      and ADD after

      PHP Source Code

      1. if(!isset($errorType[$errno])){
      2. $errorType[$errno] = $errno;
      3. }
    • this solution is not only for you, if anyone has an error,
      wich is not in the errortype array, he will get this error,
      and this will prevent him to see the real error,
      so this is a valubale fix, and i worte it that people can find the solution if they search.
      cause this error hasn't been fixed till now.
    • Hello,
      I do this for fix this error if someone need it :

      Message: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated
      File: /includes/pages/game/AbstractGamePage.class.php
      Line: 161
      URL: 192.168.1.11:8080/game.php
      PHP-Version: 7.3.10
      PHP-API: apache2handler
      2Moons Version: 2.0.git
      Debug Backtrace:
      #0 [internal function]: errorHandler(8192, 'filter_var(): e...', 'FILEPATH ...', 161, Array)
      #1 /includes/pages/game/AbstractGamePage.class.php(161): filter_var('http://2moons.d...', 273, 65536)
      #2 /includes/pages/game/AbstractGamePage.class.php(175): AbstractGamePage->getNavigationData()
      #3 /includes/pages/game/AbstractGamePage.class.php(245): AbstractGamePage->getPageData()
      #4 /includes/pages/game/ShowOverviewPage.class.php(307): AbstractGamePage->display('page.overview.d...')
      #5 /game.php(57): ShowOverviewPage->show()
      #6 {main}



      So to fix it open AbstractGamePage.php, find line 161 and replace this code:

      PHP Source Code: AbstractGamePage.php

      1. 'hasBoard' => filter_var($config->forum_url, FILTER_VALIDATE_URL,FILTER_FLAG_SCHEME_REQUIRED)),

      replace by this :

      PHP Source Code: AbstractGamePage.php

      1. 'hasBoard' => filter_var($config->forum_url, FILTER_VALIDATE_URL),

      The post was edited 1 time, last by Malavita ().

    • Eso depende de la versión de PHP q uses con PHP 5.6 no existe ese problema

      Malavita wrote:

      Hello,
      I do this for fix this error if someone need it :

      Message: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated
      File: /includes/pages/game/AbstractGamePage.class.php
      Line: 161
      URL: 192.168.1.11:8080/game.php
      PHP-Version: 7.3.10
      PHP-API: apache2handler
      2Moons Version: 2.0.git
      Debug Backtrace:
      #0 [internal function]: errorHandler(8192, 'filter_var(): e...', 'FILEPATH ...', 161, Array)
      #1 /includes/pages/game/AbstractGamePage.class.php(161): filter_var('http://2moons.d...', 273, 65536)
      #2 /includes/pages/game/AbstractGamePage.class.php(175): AbstractGamePage->getNavigationData()
      #3 /includes/pages/game/AbstractGamePage.class.php(245): AbstractGamePage->getPageData()
      #4 /includes/pages/game/ShowOverviewPage.class.php(307): AbstractGamePage->display('page.overview.d...')
      #5 /game.php(57): ShowOverviewPage->show()
      #6 {main}



      So to fix it open AbstractGamePage.php, find line 161 and replace this code:

      PHP Source Code: AbstractGamePage.php

      1. 'hasBoard' => filter_var($config->forum_url, FILTER_VALIDATE_URL,FILTER_FLAG_SCHEME_REQUIRED)),
      replace by this :

      PHP Source Code: AbstractGamePage.php

      1. 'hasBoard' => filter_var($config->forum_url, FILTER_VALIDATE_URL),
    • Por eso probé las versiones anteriores de PHP. Creo que estaba Meladze usando una versión de PHP demasiado reciente, por eso estaba buscando una manera fácil de corregir el error en las versiones recientes en caso de que un nuevo usuario se enfrente a él.
      En cualquier caso, el error dado por Meladze está arreglado Creo que he respondido al problema (futuro) :)
    • The problem as stated in the topic of the future of 2moons is that the current code becomes obsolete and the server will no longer have php 5.6 because we are getting to the php 8 version.

      The post was edited 1 time, last by Danter14 ().

    • Danter14 wrote:

      The problem as stated in the topic of the future of 2moons is that the current code becomes obsolete and the server will no longer have php 5.6 because we are getting to the php 8 version.

      La meilleur solution actuelle est de refaire un 2moons sous php 8 une fois complète, la question est qui le fera de 0 au propre ^^
      Perso, j'ai pas encore les connaissances nécéssaires en php pour le faire, le js et le reste je penses que c'est facile de trouver quelqu'un pour ça le plus gros reste le php, et je penses qu'on pourrait lui donner un renouveau en restant sur le thème de base
    • Malavita wrote:

      La meilleur solution actuelle est de refaire un 2moons sous php 8 une fois complète, la question est qui le fera de 0 au propre
      Perso, j'ai pas encore les connaissances nécéssaires en php pour le faire, le js et le reste je penses que c'est facile de trouver quelqu'un pour ça le plus gros reste le php, et je penses qu'on pourrait lui donner un renouveau en restant sur le thème de base
      Justement le topic ici est en rapport avec ce que vous venez juste de dire, certes un changement est à faire car plus le temps passe plus le code deviendra impossible à utilisé, car au bout d'un moment les hébergeurs vont plus donnée accès au ancienne version de php