Postado Maio 26, 2020 5 anos Estou com problemas na criação de contas, peguei o Gesior 2020 e ao criar contas no site ele não salva as contas, assim que crio ja na consigo logar no site e muito menos no OT e não salva a conta da DB. MEU CONFIG.PHP Citar <?PHP if ( ! function_exists('is_https')) { function is_https() { if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') { return TRUE; } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https') { return TRUE; } elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') { return TRUE; } return FALSE; } } $is_https = is_https(); if ($is_https) { $base_url = "https://" . $_SERVER['HTTP_HOST']; $base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']); } else { $base_url = "http://" . $_SERVER['HTTP_HOST']; $base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']); } $config['base_url'] = $base_url; $config['site']['base_url'] = $base_url; # Info Bar Config $config['site']['info_bar_active'] = true; # Using Ajax Field Validation, this is important if you want to use ajax check in your create account. $config['site']['sqlHost'] = "127.0.0.1"; $config['site']['sqlUser'] = "hopper"; $config['site']['sqlPass'] = "520331"; $config['site']['sqlBD'] = "schema"; # Config Shop $outfits_list = array(); $loyalty_title = array( 50 => 'Scout', 100 => 'Sentinel', 200 => 'Steward', 400 => 'Warden', 1000 => 'Squire', 2000 => 'Warrior', 3000 => 'Keeper', 4000 => 'Guardian', 5000 => 'Sage '); $config['shop']['newitemdays'] = 1; # Configure your active payment method with this $config['paymentsMethods'] = [ 'pagseguro' => true, 'paypal' => false, 'transfer' => false ]; # Pagseguro configs $config['pagseguro']['testing'] = true; $config['pagseguro']['lightbox'] = true; $config['pagseguro']['tokentest'] = ""; $config['pagseguro']['email'] = ""; $config['pagseguro']['token'] = ""; $config['pagseguro']['produtoNome'] = 'Tibia Coins'; $config['pagseguro']['urlRedirect'] = $config['base_url']; $config['pagseguro']['urlNotification'] = $config['base_url'].'retpagseguro.php'; $config['donate']['offers'] = [ 500=>50, 800=>125, 1500=>250, 2800=>500, 4900=>1000 ]; # Bank transfer data $config['banktransfer']['bank'] = "Caixa Econômica"; $config['banktransfer']['agency'] = ""; $config['banktransfer']['account'] = ""; $config['banktransfer']['name'] = ""; $config['banktransfer']['operation'] = 003; # PayPal configs $config['paypal']['email'] = ""; # Social Networks $config['social']['facebook'] = "https://www.facebook.com/tibia"; $config['social']['discord'] = ""; # Character Former name, time in days to show the former names $config['site']['formerNames'] = 10; $config['site']['formerNames_amount'] = 10; # PAGE: characters.php $config['site']['quests'] = array( "Demon Helmet" => 2213, "In Service of Yalahar" => 12279, "Pits Of Inferno" => 10544, "The Ancient Tombs" => 50220, "The Annihilator" => 2215, "The Demon Oak" => 1010, "Wrath Of The Emperor" => 12374 ); # PAGE: whoisonline.php $config['site']['private-servlist.com_server_id'] = 0; # Account Maker Config $config['site']['serverPath'] = "/home/OTServ/"; $config['site']['encryptionType'] = 'sha1'; $config['site']['useServerConfigCache'] = false; $towns_list = array( 1 => 'Venore', 2 => 'Thais', 3 => 'Kazordoon', 4 => 'Carlin', 5 => 'Ab\'Dendriel', 6 => 'Rookgaard', 7 => 'Liberty Bay', 8 => 'Port Hope', 9 => 'Ankrahmun', 10 => 'Darashia', 11 => 'Edron', 12 => 'Svargrond', 13 => 'Yalahar', 14 => 'Farmine', 28 => 'Gray Beach', 29 => 'Roshamuul', 33 => 'Rathleton', 34 => 'Krailos', 51 => 'Dawnport', 52 => 'Feyrist' ); # Create Account Options $config['site']['one_email'] = true; $config['site']['create_account_verify_mail'] = false; $config['site']['verify_code'] = true; $config['site']['email_days_to_change'] = 3; $config['site']['newaccount_premdays'] = 3; $config['site']['send_register_email'] = true; $config['site']['flash_client_enabled'] = false; # Create Character Options $config['site']['newchar_vocations'] = array(0 => 'Sorcerer Sample, Druid Sample, Paladin Sample, Knight Sample'); $config['site']['newchar_towns'] = array(1); $config['site']['max_players_per_account'] = 5; # Emails Config $config['site']['send_emails'] = true; $config['site']['mail_address'] = ""; $config['site']['mail_senderName'] = ""; $config['site']['smtp_enabled'] = true; $config['site']['smtp_host'] = "ssl://smtp.gmail.com"; $config['site']['smtp_port'] = 465; $config['site']['smtp_auth'] = true; $config['site']['smtp_user'] = ""; $config['site']['smtp_pass'] = ""; $config['site']['smtp_secure'] = true; # PAGE: accountmanagement.php $config['site']['send_mail_when_change_password'] = true; $config['site']['send_mail_when_generate_reckey'] = true; $config['site']['email_time_change'] = 7; $config['site']['daystodelete'] = 7; # PAGE: guilds.php $config['site']['guild_need_level'] = 100; $config['site']['guild_need_pacc'] = false; $config['site']['guild_image_size_kb'] = 50; $config['site']['guild_description_chars_limit'] = 2000; $config['site']['guild_description_lines_limit'] = 6; $config['site']['guild_motd_chars_limit'] = 250; # PAGE: adminpanel.php $config['site']['access_admin_panel'] = 6; # PAGE: latestnews.php $config['site']['news_limit'] = 6; # PAGE: killstatistics.php $config['site']['last_deaths_limit'] = 40; # PAGE: team.php $config['site']['groups_support'] = array(2, 3, 4, 5); # PAGE: highscores.php $config['site']['groups_hidden'] = array(3, 4, 5); $config['site']['accounts_hidden'] = array(1); # PAGE: lostaccount.php $config['site']['email_lai_sec_interval'] = 180; # Layout Config $config['site']['layout'] = 'tibiacom'; $config['site']['vdarkborder'] = '#505050'; $config['site']['darkborder'] = '#D4C0A1'; $config['site']['lightborder'] = '#F1E0C6'; MEU ACCOUNT.PHP Citar <?php if(!defined('INITIALIZED')) exit; class Account extends ObjectData { const LOADTYPE_ID = 'id'; const LOADTYPE_NAME = 'name'; const LOADTYPE_MAIL = 'email'; public static $table = 'accounts'; public $data = array('name' => null, 'password' => null, 'secret'=>null, 'premdays' => 0, 'coins' => 0, 'lastday' => 0, 'email' => null, 'key' => null, 'create_ip' => null, 'creation' => null, 'page_access' => 1, 'location' => null, 'rlname' => null, 'birth_date' => null, 'gender' => null, 'email_new' => null, 'email_new_time' => 0, 'email_code' => null, 'next_email' => 0, 'last_post' => 0, 'flag' => null, 'vote' => 0, 'loyalty_points' => 0, 'guild_points' => 0, 'authToken' => '0'); public static $fields = array('id', 'name', 'password', 'premdays', 'coins', 'lastday', 'email', 'key', 'create_ip', 'creation', 'page_access', 'location', 'rlname','birth_date', 'gender', 'email_new', 'email_new_time', 'email_code', 'next_email', 'last_post', 'flag', 'vote', 'loyalty_points', 'guild_points'); public $players; public $playerRanks; public $guildAccess; public $bans; public function __construct($search_text = null, $search_by = self::LOADTYPE_ID) { if($search_text != null) $this->load($search_text, $search_by); } public function load($search_text, $search_by = self::LOADTYPE_ID) { if(in_array($search_by, self::$fields)) $search_string = $this->getDatabaseHandler()->fieldName($search_by) . ' = ' . $this->getDatabaseHandler()->quote($search_text); else new Error_Critic('', 'Wrong Account search_by type.'); $fieldsArray = array(); foreach(self::$fields as $fieldName) $fieldsArray[$fieldName] = $this->getDatabaseHandler()->fieldName($fieldName); $this->data = $this->getDatabaseHandler()->query('SELECT ' . implode(', ', $fieldsArray) . ' FROM ' . $this->getDatabaseHandler()->tableName(self::$table) . ' WHERE ' . $search_string)->fetch(); } public function loadById($id) { $this->load($id, 'id'); } public function loadByName($name) { $this->load($name, 'name'); } public function loadByEmail($mail) { $this->load($mail, 'email'); } public function save($forceInsert = false) { if(!isset($this->data['id']) || $forceInsert) { $keys = array(); $values = array(); foreach(self::$fields as $key) if($key != 'id') { $keys[] = $this->getDatabaseHandler()->fieldName($key); $values[] = $this->getDatabaseHandler()->quote($this->data[$key]); } $this->getDatabaseHandler()->query('INSERT INTO ' . $this->getDatabaseHandler()->tableName(self::$table) . ' (' . implode(', ', $keys) . ') VALUES (' . implode(', ', $values) . ')'); $this->setID($this->getDatabaseHandler()->lastInsertId()); } else { $updates = array(); foreach(self::$fields as $key) if($key != 'id') $updates[] = $this->getDatabaseHandler()->fieldName($key) . ' = ' . $this->getDatabaseHandler()->quote($this->data[$key]); $this->getDatabaseHandler()->query('UPDATE ' . $this->getDatabaseHandler()->tableName(self::$table) . ' SET ' . implode(', ', $updates) . ' WHERE ' . $this->getDatabaseHandler()->fieldName('id') . ' = ' . $this->getDatabaseHandler()->quote($this->data['id'])); } } public function getPlayers($forceReload = false) { if(!isset($this->players) || $forceReload) { $this->players = new DatabaseList('Player'); $this->players->setFilter(new SQL_Filter(new SQL_Field('account_id'), SQL_Filter::EQUAL, $this->getID())); $this->players->addOrder(new SQL_Order(new SQL_Field('name'))); } return $this->players; } public function unban() { $this->getDatabaseHandler()->query('DELETE FROM ' . $this->getDatabaseHandler()->tableName('account_bans') . ' WHERE ' . $this->getDatabaseHandler()->fieldName('account_id') . ' = ' . $this->getDatabaseHandler()->quote($this->data['id'])); unset($this->bans); } public function loadBans($forceReload = false) { if(!isset($this->bans) || $forceReload) { $this->bans = new DatabaseList('AccountBan'); $filter = new SQL_Filter(new SQL_Field('account_id'), SQL_Filter::EQUAL, $this->data['id']); $this->bans->setFilter($filter); } } public function isBanned($forceReload = false) { $this->loadBans($forceReload); return count($this->bans) > 0; } public function getBanTime($forceReload = false) { $this->loadBans($forceReload); $lastExpires = 0; $now = date('Y-m-d h:i:s'); foreach($this->bans->data as $ban) { if($ban['expires_at'] <= $now) { $lastExpires = 0; break; } if($ban['expires_at'] > $now && $ban['expires_at'] > $lastExpires) $lastExpires = $ban['expires_at']; } return $lastExpires; } public function delete() { $this->getDatabaseHandler()->query('DELETE FROM ' . $this->getDatabaseHandler()->tableName(self::$table) . ' WHERE ' . $this->getDatabaseHandler()->fieldName('id') . ' = ' . $this->getDatabaseHandler()->quote($this->data['id'])); unset($this->data['id']); } public function setID($value){$this->data['id'] = $value;} public function getID(){return $this->data['id'];} public function setName($value){$this->data['name'] = $value;} public function getName(){return $this->data['name'];} public function setPassword($value) { $this->data['password'] = Website::encryptPassword($value, $this); } public function getPassword(){return $this->data['password'];} public function setPremDays($value){$this->data['premdays'] = $value;} public function getPremDays(){return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday']));} public function setLastDay($value){$this->data['lastday'] = $value;} public function getLastDay(){return $this->data['lastday'];} public function setMail($value){$this->data['email'] = $value;} public function getMail(){return $this->data['email'];} public function setKey($value){$this->data['key'] = $value;} public function getKey(){return $this->data['key'];} public function setCreateIP($value){$this->data['create_ip'] = $value;} public function getCreateIP(){return $this->data['create_ip'];} public function setCreateDate($value){$this->data['creation'] = $value;} public function getCreateDate(){return $this->data['creation'];} public function setPremiumPoints($value){$this->data['coins'] = $value;} public function getPremiumPoints(){return $this->data['coins'];} public function setPageAccess($value){$this->data['page_access'] = $value;} public function getPageAccess(){return $this->data['page_access'];} public function setLocation($value){$this->data['location'] = $value;} public function getLocation(){return $this->data['location'];} public function setLoyalty($value){$this->data['loyalty_points'] = $value;} public function getLoyalty(){return $this->data['loyalty_points'];} public function setRLName($value){$this->data['rlname'] = $value;} public function getRLName(){return $this->data['rlname'];} public function setBirthDate($value){$this->data['birth_date'] = $value;} public function getBirthDate(){return $this->data['birth_date'];} public function setGender($value){$this->data['gender'] = $value;} public function getGender(){return $this->data['gender'];} public function setFlag($value){$this->data['flag'] = $value;} public function getFlag(){return $this->data['flag'];} public function getEMail(){return $this->getMail();} public function setEMail($value){$this->setMail($value);} public function getPlayersList(){return $this->getPlayers();} public function getGuildAccess($guildID){return $this->getGuildLevel($guildID);} public function isValidPassword($password) { return ($this->data['password'] == Website::encryptPassword($password, $this)); } public function find($name){$this->loadByName($name);} public function findByEmail($email){$this->loadByEmail($email);} public function isPremium(){return ($this->getPremDays() > 0);} public function getLastLogin(){return $this->getLastDay();} public function getSecret(){return $this->data['secret'];} public function setSecret($value){$this->data['secret'] = $value;} }
Postado Maio 26, 2020 5 anos fecha seu ot. e executa esse comando na database, SET GLOBAL sql_mode=''; depois de executa tenta criar conta denovo e logar
Postado Maio 30, 2020 5 anos Não mostra nenhum erro? Comece debugando o site, ativa em index os erros, se não aparecer nada de útil, vai até a pagina e coloca manualmente ini_set('display_errors',1); ini_set('display_startup_erros',1); error_reporting(E_ALL); e olhar os logs também, se for em linux /var/logs. isso pode ser diversas coisas, então tem que mostrar o que pode tá causando, quem ta olhando por fora saber o que é ou te da um norte.
Postado Outubro 29, 2020 4 anos Em 26/05/2020 em 11:43, diegokenshin disse: fecha seu ot. e executa esse comando na database, SET GLOBAL sql_mode=''; depois de executa tenta criar conta denovo e logar Meu site estava falando que a conta foi criada mas não enviava para a database. Realizei seu procedimento e funcionou. Fica a dica para futuros que forem ler. mídias sociais talk to me vídeos
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.