Ankündigung

Einklappen
Keine Ankündigung bisher.

Habe ein Problem

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Habe ein Problem

    Hallo , ich bin neu hier , und habe leider ein kleines Problem , und zwar habe ich mir gestern ein sogenanntes OpenSource Game geladen , es versucht auf einem Webspace zu installieren , alles gemacht wie es in der Readme steht doch wenn ich mich Registrieren will Funktioniert es nicht bekomme immer diese Fehler Meldung " Fatal error: Call to undefined method User:rocess() in /users/exiswasu/www/index/do/register.php on line 95 "

    Könnte mir da eventuell jemand Helfen?

    Hier der Ganze Code.

    PHP-Code:
    <?
    ///////////////////////////////////////////////////////////////////////////////////
    // cloudRealms Web MMORPG Game Engine                                             /
    // Description: cloudRealms is a web based game engine that allows game           /
    // developers to easily design and deploy 2D web based social MMORPG games.       /
    ///////////////////////////////////////////////////////////////////////////////////
    // Distributor: Verdis Technologies                                               /
    // Website: www.verdisx.com                                                       / 
    ///////////////////////////////////////////////////////////////////////////////////
    // Author: Ronald A. Richardson                                                   /
    // Website: www.ronaldarichardson.com                                             /
    // Email: theprestig3@gmail.com                                                   /
    ///////////////////////////////////////////////////////////////////////////////////
    // File: register.php                                                             /
    // Modified: 6/13/2011                                                            /
    ///////////////////////////////////////////////////////////////////////////////////
    // This file is part of cloudRealms.                                              /
    //                                                                                /
    // cloudRealms is free software: you can redistribute it and/or modify            /
    // it under the terms of the GNU Affero General Public License as published by    /
    // the Free Software Foundation, either version 3 of the License, or              /
    // (at your option) any later version.                                            /
    //                                                                                /
    // cloudRealms is distributed in the hope that it will be useful,                 /
    // but WITHOUT ANY WARRANTY; without even the implied warranty of                 /
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                  /
    // GNU Affero General Public License for more details.                            /
    //                                                                                /
    // You should have received a copy of the GNU Affero General Public License       /
    // along with cloudRealms.  If not, see <http://www.gnu.org/licenses/>.           /
    ///////////////////////////////////////////////////////////////////////////////////

    include('../classes/user.class.php');
    include('../includes/connect.php');
    include('../interface/header.php');

    echo '<link href="../interface/themes/blue/styles.css" rel="stylesheet" type="text/css" />';
    echo '<link href="../interface/styles/layout.css" rel="stylesheet" type="text/css" />';
    echo '<div style="margin:30px;color:#000;">';
    // Avatar upload process
    $target = "../uploads/avatar/"; 
    $target = $target . basename( $_FILES['avatar']['name']);
    if(move_uploaded_file($_FILES['avatar']['tmp_name'], $target)) 

        // SUCCESSFUL AVATAR UPLOAD!
    } else { 
        //echo "<div class='status error'><p><img src='".$basedir."interface/img/icons/icon_error.png' /><span>Error!</span> No avatar uploaded</p></div>";
    }

    // This makes sure they did not leave any fields blank
     if (!$_POST['username'] | !$_POST['password'] | !$_POST['password2'] | !$_POST['email'] | !$_POST['status']) {
        die("<div class='status error'><p><img src='".$basedir."interface/img/icons/icon_error.png' /><span>Error!</span> You did not complete all of the required fields</p></div><a href='../register.php'>try again</a>");
    }

    // Checks if the username is in use
    if (!get_magic_quotes_gpc()) {
        $_POST['username'] = addslashes($_POST['username']);
    }
     $usercheck = $_POST['username'];
     $check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'") 
    or die(mysql_error());
     $check2 = mysql_num_rows($check);
     
    // If the name exists it gives an error
     if ($check2 != 0) {
        die("<div class='status error'><p><img src='".$basedir."interface/img/icons/icon_error.png' /><span>Error!</span> Sorry, the username ".$_POST['username']." is already in use</p></div><a href='../register.php'>try again</a>");
    }

    // Checks if the email is in use
    if (!get_magic_quotes_gpc()) {
        $_POST['email'] = addslashes($_POST['email']);
    }
     $emailcheck = $_POST['email'];
     $check_email = mysql_query("SELECT email FROM users WHERE email = '$emailcheck'") 
    or die(mysql_error());
     $check2_email = mysql_num_rows($check_email);
     
    // If the name exists it gives an error
     if ($check2_email != 0) {
        die("<div class='status error'><p><img src='".$basedir."interface/img/icons/icon_error.png' /><span>Error!</span> Sorry, the email ".$_POST['email']." is already in use</p></div><a href='../register.php'>try again</a>");
    }
    // This makes sure both passwords entered match
    if ($_POST['password'] != $_POST['password2']) {
        die("<div class='status error'><p><img src='".$basedir."interface/img/icons/icon_error.png' /><span>Error!</span> Your passwords did not match</p></div><a href='../register.php'>try again</a>");
    }
    // Encodes password
    $_POST['password']=md5($_POST['password']);
    if (!get_magic_quotes_gpc()) {
        $_POST['password'] = addslashes($_POST['password']);
        $_POST['username'] = addslashes($_POST['username']);
    }
    $user = $_POST['username'];
    // Finally creates the user
    $user = new User();
    $user->process($_POST['username'],$_POST['password'],$_POST['email'],$_FILES['avatar']['name'],$_POST['status']);
    $connect->CloseDB;
    echo '</div>';
    // finally for ID retrieval purposes only
    ?>

  • #2
    http://www.php.de/php-einsteiger/543...produkten.html
    [QUOTE=nikosch]Macht doch alle was Ihr wollt mit Eurem Billigscheiß. Von mir aus sollen alle Eure Server abrauchen.[/QUOTE]

    Kommentar


    • #3
      ich hoffe für dich, dass dieser Haufen Source-Code-Müll kostenlos war - in Zeiten von PHP 5.4 und neuer sind sowohl mysql_ als auch magic_quotes eigentlich obsolet und gehören durch moderne Entsprechungen ersetzt

      PHP-Code:
      $user $_POST['username'];
      // Finally creates the user
      $user = new User();
      $user->process($_POST['username'],$_POST['password'],$_POST['email'],$_FILES['avatar']['name'],$_POST['status']); 
      die Fehlermeldung kommt aus dieser letzten Zeile ...

      da die User-Class aber hier
      PHP-Code:
      include('../classes/user.class.php'); 
      eingebunden wird ... steckt das eigentliche Problem wohl in dieser Datei
      "Irren ist männlich", sprach der Igel und stieg von der Drahtbürste [IMG]http://www.php.de/core/images/smilies/icon_lol.gif[/IMG]

      Kommentar


      • #4
        Habe ein Problem
        Ich auch.
        [COLOR="#F5F5FF"]--[/COLOR]
        [COLOR="Gray"][SIZE="6"][FONT="Georgia"][B]^^ O.O[/B][/FONT] [/SIZE]
        „Emoticons machen einen Beitrag etwas freundlicher. Deine wirken zwar fachlich richtig sein, aber meist ziemlich uninteressant.
        [URL="http://www.php.de/javascript-ajax-und-mehr/107400-draggable-sorttable-setattribute.html#post788799"][B]Wenn man nur Text sieht, haben viele junge Entwickler keine interesse, diese stumpfen Texte zu lesen.“[/B][/URL][/COLOR]
        [COLOR="#F5F5FF"]
        --[/COLOR]

        Kommentar


        • #5
          Zitat von eagle275 Beitrag anzeigen
          ich hoffe für dich, dass dieser Haufen Source-Code-Müll kostenlos war - in Zeiten von PHP 5.4 und neuer sind sowohl mysql_ als auch magic_quotes eigentlich obsolet und gehören durch moderne Entsprechungen ersetzt

          PHP-Code:
          $user $_POST['username'];
          // Finally creates the user
          $user = new User();
          $user->process($_POST['username'],$_POST['password'],$_POST['email'],$_FILES['avatar']['name'],$_POST['status']); 
          die Fehlermeldung kommt aus dieser letzten Zeile ...

          da die User-Class aber hier
          PHP-Code:
          include('../classes/user.class.php'); 
          eingebunden wird ... steckt das eigentliche Problem wohl in dieser Datei
          Hallo danke für die antwort , ja es war kostenlos ..

          Habe hier mal die Datei dazu gepackt.

          PHP-Code:
          <?php
          ///////////////////////////////////////////////////////////////////////////////////
          // cloudRealms Web MMORPG Game Engine                                             /
          // Description: cloudRealms is a web based game engine that allows game           /
          // developers to easily design and deploy 2D web based social MMORPG games.       /
          ///////////////////////////////////////////////////////////////////////////////////
          // Distributor: Verdis Technologies                                               /
          // Website: www.verdisx.com                                                       / 
          ///////////////////////////////////////////////////////////////////////////////////
          // Author: Ronald A. Richardson                                                   /
          // Website: www.ronaldarichardson.com                                             /
          // Email: theprestig3@gmail.com                                                   /
          ///////////////////////////////////////////////////////////////////////////////////
          // File: user.class.php                                                           /
          // Modified: 6/13/2011                                                            /
          ///////////////////////////////////////////////////////////////////////////////////
          // This file is part of cloudRealms.                                              /
          //                                                                                /
          // cloudRealms is free software: you can redistribute it and/or modify            /
          // it under the terms of the GNU Affero General Public License as published by    /
          // the Free Software Foundation, either version 3 of the License, or              /
          // (at your option) any later version.                                            /
          //                                                                                /
          // cloudRealms is distributed in the hope that it will be useful,                 /
          // but WITHOUT ANY WARRANTY; without even the implied warranty of                 /
          // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                  /
          // GNU Affero General Public License for more details.                            /
          //                                                                                /
          // You should have received a copy of the GNU Affero General Public License       /
          // along with cloudRealms.  If not, see <http://www.gnu.org/licenses/>.           /
          ///////////////////////////////////////////////////////////////////////////////////

          class User {

              function 
          createUser()
              {
                  
          // start here
              
          }
              
              public function 
          getCharacterID($charID) {
                  
          $this->characterID $charID;
              }
              
              public function 
          forgotPassword($mail)
              {
                  
          //Iind user data in database
                  
          $newpassword $this->rand_string(20);
                  
          $encodedpassword md5($newpassword);
                  
          $query = ("UPDATE users SET password = '$encodedpassword' WHERE email = '$mail'; ");
                  
          mysql_query($query) or die ("MySQL error ".mysql_errno().": ".mysql_error()."\n<br>When executing:<br>\n$query\n<br>");
                  
                  
          $to $mail;
                  
          $subject "Feeder Story Account Update: New Password";
                  
          $message "This is a message from Feeder Story MMORPG. Here is your new password ----> $newpassword";
                  
          $from "no-reply@feederstory.co.cc";
                  
          $headers "From: $from";
                  return 
          mail($to,$subject,$message,$headers);
                  echo 
          "Mail Sent.";
                  
              }
              
              public function 
          changePassword($newpassword$user)
              {
                  
          // make sure user is logged in
                  
          if(!$_SESSION[username] = ""){
                      
          $encodednewpassword md5($newpassword);
                      
          $q = ("UPDATE users SET password = '$encodednewpassword' WHERE username = '$user'");
                      
          mysql_query($q) or die ("MySQL error ".mysql_errno().": ".mysql_error()."\n<br>When executing:<br>\n$query\n<br>");
                      echo 
          '<center><img src="../interface/img/ajax-loader.gif"><br>';
                      echo 
          'Your password has been changed!<br>';
                      echo 
          '<a href="../do/logout.php" target="_parent">click here to continue...</a>';
                  } else {
                      echo 
          "You must be logged in to change your password, make sense?<br><br>";
                  }
              }
              
              public function 
          updateStatus($new_status$user)
              {
                  
          $q = ("INSERT INTO statuses (user, status) VALUES ('$user', '$new_status')");
                  
          mysql_query($q) or die ("MySQL error ".mysql_errno().": ".mysql_error()."\n<br>When executing:<br>\n$query\n<br>");
              }
              
              public function 
          updateEmail($new_email$user)
              {
                  
          $q = ("UPDATE users SET email = '$new_email' WHERE username = '$user'");
                  
          mysql_query($q) or die ("MySQL error ".mysql_errno().": ".mysql_error()."\n<br>When executing:<br>\n$query\n<br>");
                  echo 
          '<center><img src="../interface/img/ajax-loader.gif"><br>';
                  echo 
          'Your email has been updated!<br>';
              }
              
              public function 
          rand_string$length )
              {
                  
          $chars "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";    
                  
          $size strlen$chars );
                  for( 
          $i 0$i $length$i++ )
                  {
                      
          $str .= $charsrand0$size ) ];
                  }
                  return 
          $str;
              }
          }
          ?>

          Kommentar


          • #6
            ich will gar nicht wissen, wo du das her hast, nur soviel, den distributor gibts wohl nicht mehr.

            Kommentar


            • #7
              Fand das im Internet , und wollte es mal Testen , halt so zum Spass .. nur krieg ich es nicht zum Laufen , laut Login sollte es wohl auch einen Demo user geben , der anscheind auch nicht existiert.

              Kommentar


              • #8
                Hier ist der Link : http://exiswasu.bplaced.net/index/

                Kommentar


                • #9
                  Die Funktion process gibt es in der Klasse user nicht und somit kannst du das alles vergessen
                  Die Deutsche Rechtschreibung ist Freeware! Du darfst sie kostenlos nutzen, allerdings ist sie nicht Open Source, d.h. Du darfst sie nicht verändern oder in veränderter Form veröffentlichen.

                  Kommentar


                  • #10
                    Das heisst ? , könnte man es auch ändern?

                    Kommentar


                    • #11
                      Das heisst, das du das Script in die Tonne hauen kannst. Es wird hier auch niemand auf die Idee kommen, den Kram zu reparieren.
                      Die Deutsche Rechtschreibung ist Freeware! Du darfst sie kostenlos nutzen, allerdings ist sie nicht Open Source, d.h. Du darfst sie nicht verändern oder in veränderter Form veröffentlichen.

                      Kommentar


                      • #12
                        das der Code nicht unbedingt der heilige Gral ist, sollte auch dir auffallen - leere Funktionen, fehlende Funktionen, unsinnige Code-Blöcke ....

                        es liegt garantiert besseres Kram im Internet herum, das ebenfalls kostenlos ist
                        "Irren ist männlich", sprach der Igel und stieg von der Drahtbürste [IMG]http://www.php.de/core/images/smilies/icon_lol.gif[/IMG]

                        Kommentar


                        • #13
                          Okay dann weiss ich bescheid , danke für die vielen Antworten.

                          Kommentar

                          Lädt...
                          X