antiblock
Elveron
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Cristian Jordan

Travian erros

5 posts in this topic

Pessoal estou com esse problema com servidor de travian, alguém pode me ajudar?

 

https://uploaddeimagens.com.br/imagens/travian-png--3

 

https://uploaddeimagens.com.br/imagens/travian2-png

 

Quando não dá isso. 

Aparece um erro 500.... 

Me ajudem por favor!

Share this post


Link to post
Share on other sites
antiblock
Cyphriun

No ficheiro de configuração da base de dados os dados estão errados e devias de usar no menos mysqli em vez de mysql.

Share this post


Link to post
Share on other sites

Esse é o destinatário ?

GameEngine>Database>db_MYSQL.php

Ou 

\install\include\database.php

 

O que devo mudar ?

Edited by Cristian Jordan (see edit history)

Share this post


Link to post
Share on other sites
1 hora atrás, Cristian Jordan disse:

Esse é o destinatário ?

GameEngine>Database>db_MYSQL.php

Ou 

\install\include\database.php

 

O que devo mudar ?

Deve ser na \install\include\database.php

 

mas de qualquer forma altera os dados nas duas

Share this post


Link to post
Share on other sites

database.php 

 

<?php
//////////////////////////////////////////////////////////////////////////////////////////////////////
//                                             TRAVIANX                                             //
//            Only for advanced users, do not edit if you dont know what are you doing!             //
//                                Made by: Dzoki & Dixie (TravianX)                                 //
//                              - TravianX = Travian Clone Project -                                //
//                                 DO NOT REMOVE COPYRIGHT NOTICE!                                  //
//////////////////////////////////////////////////////////////////////////////////////////////////////

include("constant.php");

class MYSQLi_DB {
    
    var $connection;
    
    function MYSQLi_DB() {
        $this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB) or die(mysqli_error());
    }
        function query($query) {
        return $this->connection->query($query);
        }
        
};

class MYSQL_DB {
    
    var $connection;
    
    function MYSQL_DB() {
        $this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
        mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
    }
    
    function mysql_exec_batch ($p_query, $p_transaction_safe = true) {
  if ($p_transaction_safe) {
      $p_query = 'START TRANSACTION;' . $p_query . '; COMMIT;';
    };
  $query_split = preg_split ("/[;]+/", $p_query);
  foreach ($query_split as $command_line) {
    $command_line = trim($command_line);
    if ($command_line != '') {
      $query_result = mysql_query($command_line);
      if ($query_result == 0) {
        break;
      };
    };
  };
  return $query_result;

    function query($query) {
        return mysql_query($query, $this->connection);
    }
};

if(DB_TYPE) {
    $database = new MYSQLi_DB;
}
else {
    $database = new MYSQL_DB;
}
?>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now