Ir para conteúdo
  • Cadastre-se

[DÚVIDA] base de dados


Posts Recomendados

E ai galera, boa tarde!!

Estou tentando configurar o site para meu OTserver, porém este erro está ocorrendo, e não sei como resolver, verifiquei as linhas do código e aparentemente não há nada de errado, se alguem puder ajudar agradeço..

 

http://imgur.com/2UtctmQ

Editado por ZankroW (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Esta é uma mensagem automática! Este tópico foi movido para a área correta.
Pedimos que você leia as regras do fórum.

Spoiler

This is an automated message! This topic has been moved to the correct area.
Please read the forum rules.

 

Link para o post
Compartilhar em outros sites
 

 

 

 


worldType = "no-pvp"
hotkeyAimbotEnabled = true
protectionLevel = 90000
killsToRedSkull = 6
killsToBlackSkull = 9
pzLocked = 60 * 1000
removeChargesFromRunes = false
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 10 * 60 * 1000
stairJumpExhaustion = 2 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75


ip = ""
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 1000
motd = "Welcome to belobra-world!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Belobra"
statusTimeout = 5 * 1000
replaceKickOnLogin = true
maxPacketsPerSecond = 300


coinPacketSize = 50
coinImagesURL = "http://belobra-world.com/"

expertPvp = true


clientVersionMin = 1097
clientVersionMax = 1099
clientVersionStr = "Only clients with protocol 10.99 !"

freeDepotLimit = 2000
premiumDepotLimit = 10000
depotBoxes = 17

enableLiveCasting = true
liveCastPort = 7173

deathLosePercent = -1

housePriceEachSQM = 1000
houseRentPeriod = "weekly"

timeBetweenActions = 500
timeBetweenExActions = 1000

mapName = "global"
mapAuthor = "cipsoft"

marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100

mysqlHost = "127.0.0.1"
mysqlUser = "root"
mysqlPass = ""
mysqlDatabase = "belobra-world"
mysqlPort = "3306"
passwordType = "sha1"
mysqlSock = ""

allowChangeOutfit = true
freePremium = true
kickIdlePlayerAfterMinutes = 90
maxMessageBuffer = 4
emoteSpells = false
classicEquipmentSlots = false
allowWalkthrough = true

rateExp = 500
rateSkill = 50
rateLoot = 4
rateMagic = 10
rateSpawn = 2

deSpawnRange = 2
deSpawnRadius = 50

staminaSystem = true

warnUnsafeScripts = true
convertUnsafeScripts = true

defaultPriority = "high"
startupDatabaseOptimization = true

ownerName = "X"
ownerEmail = "[email protected]"
url = ""
location = "Brasil"

 
 

 

 

 

Esta ai mano, se puder dar aquele help! 

Editado por ZankroW (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
32 minutos atrás, ZankroW disse:

 

  Ocultar conteúdo

 

 

 


worldType = "no-pvp"
hotkeyAimbotEnabled = true
protectionLevel = 90000
killsToRedSkull = 6
killsToBlackSkull = 9
pzLocked = 60 * 1000
removeChargesFromRunes = false
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 10 * 60 * 1000
stairJumpExhaustion = 2 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75


ip = ""
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 1000
motd = "Welcome to belobra-world!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Belobra"
statusTimeout = 5 * 1000
replaceKickOnLogin = true
maxPacketsPerSecond = 300


coinPacketSize = 50
coinImagesURL = "http://belobra-world.com/"

expertPvp = true


clientVersionMin = 1097
clientVersionMax = 1099
clientVersionStr = "Only clients with protocol 10.99 !"

freeDepotLimit = 2000
premiumDepotLimit = 10000
depotBoxes = 17

enableLiveCasting = true
liveCastPort = 7173

deathLosePercent = -1

housePriceEachSQM = 1000
houseRentPeriod = "weekly"

timeBetweenActions = 500
timeBetweenExActions = 1000

mapName = "global"
mapAuthor = "cipsoft"

marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100

mysqlHost = "127.0.0.1"
mysqlUser = "root"
mysqlPass = "galinhapreta"
mysqlDatabase = "belobra-world"
mysqlPort = "3306"
passwordType = "sha1"
mysqlSock = ""

allowChangeOutfit = true
freePremium = true
kickIdlePlayerAfterMinutes = 90
maxMessageBuffer = 4
emoteSpells = false
classicEquipmentSlots = false
allowWalkthrough = true

rateExp = 500
rateSkill = 50
rateLoot = 4
rateMagic = 10
rateSpawn = 2

deSpawnRange = 2
deSpawnRadius = 50

staminaSystem = true

warnUnsafeScripts = true
convertUnsafeScripts = true

defaultPriority = "high"
startupDatabaseOptimization = true

ownerName = "X"
ownerEmail = "[email protected]"
url = ""
location = "Brasil"

 
 

 

 

 

 

Esta ai mano, se puder dar aquele help! 

 

Troque por esse e tente:

 


worldType = "no-pvp"
hotkeyAimbotEnabled = true
protectionLevel = 90000
killsToRedSkull = 6
killsToBlackSkull = 9
pzLocked = 60 * 1000
removeChargesFromRunes = false
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 10 * 60 * 1000
stairJumpExhaustion = 2 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75 


ip = ""
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 1000
motd = "Welcome to belobra-world!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Belobra"
statusTimeout = 5 * 1000
replaceKickOnLogin = true
maxPacketsPerSecond = 300 


coinPacketSize = 50
coinImagesURL = "http://belobra-world.com/" 

expertPvp = true 


clientVersionMin = 1097
clientVersionMax = 1099
clientVersionStr = "Only clients with protocol 10.99 !" 

freeDepotLimit = 2000
premiumDepotLimit = 10000
depotBoxes = 17 

enableLiveCasting = true
liveCastPort = 7173 

deathLosePercent = -1 

housePriceEachSQM = 1000
houseRentPeriod = "weekly" 

timeBetweenActions = 500
timeBetweenExActions = 1000 

mapName = "global"
mapAuthor = "cipsoft" 

marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100 

sqlType = "mysql"
mysqlHost = "localhost"
mysqlUser = "root"
mysqlPass = "galinhapreta"
mysqlDatabase = "belobra-world"
mysqlPort = "3306"
passwordType = "sha1"
mysqlSock = "" 

allowChangeOutfit = true
freePremium = true
kickIdlePlayerAfterMinutes = 90
maxMessageBuffer = 4
emoteSpells = false
classicEquipmentSlots = false
allowWalkthrough = true 

rateExp = 500
rateSkill = 50
rateLoot = 4
rateMagic = 10
rateSpawn = 2 

deSpawnRange = 2
deSpawnRadius = 50 

staminaSystem = true 

warnUnsafeScripts = true
convertUnsafeScripts = true 

defaultPriority = "high"
startupDatabaseOptimization = true 

ownerName = "X"
ownerEmail = "[email protected]"
url = ""
location = "Brasil" 
 

 

Tem certeza que a database no phpmyadmin está com o nome igual você colocou no config.lua? 

belobra-world

Link para o post
Compartilhar em outros sites
Agora, Noob II disse:

Poste aqui o index.php da pasta htdocs

 

Abaixo no spoiler.

 

 



<?php
// comment to show E_NOTICE [undefinied variable etc.], comment if you want make script and see all errors
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE);

// true = show sent queries and SQL queries status/status code/error message
define('DEBUG_DATABASE',false);

define('INITIALIZED', true);

// if not defined before, set 'false' to load all normal
if(!defined('ONLY_PAGE'))
    define('ONLY_PAGE', false);
    
// check if site is disabled/requires installation
include_once('./system/load.loadCheck.php');

// fix user data, load config, enable class auto loader
include_once('./system/load.init.php');

// DATABASE
include_once('./system/load.database.php');
if(DEBUG_DATABASE)
    Website::getDBHandle()->setPrintQueries(true);
// DATABASE END

// LOGIN
if(!ONLY_PAGE)
    include_once('./system/load.login.php');
// LOGIN END

// COMPAT
// some parts in that file can be blocked because of ONLY_PAGE constant
include_once('./system/load.compat.php');
// COMPAT END

// LOAD PAGE
include_once('./system/load.page.php');
// LOAD PAGE END

// LAYOUT
// with ONLY_PAGE we return only page text, not layout
if(!ONLY_PAGE)
    include_once('./system/load.layout.php');
else
    echo $main_content;
// LAYOUT END

 

 

 

Link para o post
Compartilhar em outros sites
Agora, Noob II disse:

esse load.database tbm

 

Segue no spoiler, eu alterei o nome do banco de dados, e já alterei também nos arquivos php, porém sem sucesso ainda.

 

o site da pra ser acessado, www.belobra-world.com mas vai aparecer pra ti como aparece aqui pra mim...

 



<?php
if(!defined('INITIALIZED'))
    exit;

if(Website::getServerConfig()->isSetKey('mysqlHost'))
{
    define('SERVERCONFIG_SQL_HOST', 'localhost');
    define('SERVERCONFIG_SQL_PORT', '3306');
    define('SERVERCONFIG_SQL_USER', 'root');
    define('SERVERCONFIG_SQL_PASS', '');
    define('SERVERCONFIG_SQL_DATABASE', 'belobra');
    define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
}
else
    new Error_Critic('#E-3', 'There is no key <b>mysqlHost</b> in server config', array(new Error('INFO', 'use server config cache: <b>' . (Website::getWebsiteConfig()->getValue('useServerConfigCache') ? 'true' : 'false') . '</b>')));
Website::setDatabaseDriver(Database::DB_MYSQL);
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_HOST))
    Website::getDBHandle()->setDatabaseHost(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_HOST));
else
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_HOST . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PORT))
    Website::getDBHandle()->setDatabasePort(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PORT));
else
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PORT . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_DATABASE))
    Website::getDBHandle()->setDatabaseName(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_DATABASE));
else
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_DATABASE . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_USER))
    Website::getDBHandle()->setDatabaseUsername(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_USER));
else
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_USER . '</b> in server config file.');
if(Website::getServerConfig()->isSetKey(SERVERCONFIG_SQL_PASS))
    Website::getDBHandle()->setDatabasePassword(Website::getServerConfig()->getValue(SERVERCONFIG_SQL_PASS));
else
    new Error_Critic('#E-7', 'There is no key <b>' . SERVERCONFIG_SQL_PASS . '</b> in server config file.');

Website::setPasswordsEncryption(Website::getServerConfig()->getValue('passwordType'));
$SQL = Website::getDBHandle();

Link para o post
Compartilhar em outros sites
Citar

{
    define('SERVERCONFIG_SQL_HOST', 'localhost');
    define('SERVERCONFIG_SQL_PORT', '3306');
    define('SERVERCONFIG_SQL_USER', 'root');
    define('SERVERCONFIG_SQL_PASS', 'Aqui a senha do phpmadmin a mesma que você colocou no config.lua');
    define('SERVERCONFIG_SQL_DATABASE', 'E aqui o nome da database, igual o config.lua');
    define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
}

 

Se fosse para alterar igual o config.lua ficaria assim: 

{
    define('SERVERCONFIG_SQL_HOST', 'localhost');
    define('SERVERCONFIG_SQL_PORT', '3306');
    define('SERVERCONFIG_SQL_USER', 'root');
    define('SERVERCONFIG_SQL_PASS', 'galinhapreta');
    define('SERVERCONFIG_SQL_DATABASE', 'belobra-world');
    define('SERVERCONFIG_SQLITE_FILE', 'sqlFile');
}

Link para o post
Compartilhar em outros sites

E seu servidor? achei alguma coisa que pode ser que está causando isso 

ta usando config.lua de TFS 0.4 inferior num site de TFS 1.0 superior ou esta usando um site de TFS 1.0 para um config.lua de TFS 0.4/0.3.6

 

traduzindo isso "'There is no key localhost in server config file" fica assim > não há nenhuma chave localhost no arquivo de configuração do servidor 

 

sou muito leigo em gesior, pois uso modern acc :\ 

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo