Выключается сервер, после ввода пароля.
#1

Привет всем
Такая проблема: выключается сервер на хостинге ( Linux ) после ввода пароля, так же и при выборе скина при регистрации. На компьютере все работает хорошо, на хостинге вот такая проблема.
Думаю что-то нетак в плагинах
Логи crashdetect:
PHP код:
[14:58:51] [debugServer crashed while executing newmode.amx
[14:58:51] [debugAMX backtrace:
[
14:58:51] [debug#0 native fputchar () [0809aba0] from samp03svr
[14:58:51] [debug#1 0018c720 in ?? () from newmode.amx
[14:58:51] [debug#2 0000ebd4 in ?? () from newmode.amx
[14:58:51] [debug#3 000d8964 in public OnDialogResponse () from newmode.amx
[14:58:51] [debugSystem backtrace:
[
14:58:51] [debug#0 0026cecb in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[14:58:51] [debug#1 00264c69 in _ZN11CrashDetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[14:58:51] [debug#2 00266c99 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[14:58:51] [debug#3 0026c9d8 in ?? () from plugins/crashdetect.so
[14:58:51] [debug#4 00dcb410 in ?? ()
[14:58:51] [debug#5 0098da00 in fputc () from /lib/libc.so.6
[14:58:51] [debug#6 0809abf2 in ?? () from ./samp03svr
[14:58:51] [debug#7 08093c94 in ?? () from ./samp03svr
[14:58:51] [debug#8 00266f37 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[14:58:51] [debug#9 00269268 in ?? () from plugins/crashdetect.so
[14:58:51] [debug#10 0026f2c2 in amx_Exec () from plugins/crashdetect.so
[14:58:51] [debug#11 00266e1e in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[14:58:51] [debug#12 002692de in ?? () from plugins/crashdetect.so
[14:58:51] [debug#13 080ae33f in ?? () from ./samp03svr
[14:58:51] [debug#14 080b97da in ?? () from ./samp03svr
[14:58:51] [debug#15 08071ae8 in ?? () from ./samp03svr
[14:58:51] [debug#16 08071be2 in ?? () from ./samp03svr
[14:58:51] [debug#17 0807ba00 in ?? () from ./samp03svr
[14:58:51] [debug#18 080b59ad in ?? () from ./samp03svr
[14:58:51] [debug#19 080b5b42 in ?? () from ./samp03svr
[14:58:51] [debug#20 080b1453 in ?? () from ./samp03svr
[14:58:51] [debug#21 0093bce6 in __libc_start_main () from /lib/libc.so.6
[14:58:51] [debug#22 0804b521 in ?? () from ./samp03svr 
Помогите, заранее спасибо
Reply
#2

Лог mysql? Код авторизации и выбора скина при регистрации?
Reply
#3

Лог mysql:
PHP код:
[14:58:43] >> mysql_queryConnection handle)
[
14:58:43CMySQLHandler::Query(SELECT unbandate FROM bans WHERE name 'asdasdasas') - Successfully executed.
[
14:58:43] >> mysql_store_resultConnection handle)
[
14:58:43CMySQLHandler::StoreResult() - Result was stored.
[
14:58:43] >> mysql_num_rowsConnection handle)
[
14:58:43CMySQLHandler::NumRows() - Returned 0 row(s)
[
14:58:43] >> mysql_fetch_row_formatConnection handle)
[
14:58:43] >> mysql_queryConnection handle)
[
14:58:43CMySQLHandler::Query(SELECT unbandate FROM bans WHERE ip '213.88.102.254') - Successfully executed.
[
14:58:43] >> mysql_store_resultConnection handle)
[
14:58:43CMySQLHandler::StoreResult() - Result was stored.
[
14:58:43] >> mysql_num_rowsConnection handle)
[
14:58:43CMySQLHandler::NumRows() - Returned 0 row(s)
[
14:58:43] >> mysql_free_resultConnection handle)
[
14:58:43CMySQLHandler::FreeResult() - Result was successfully free'd.
[14:58:49] >> mysql_query( Connection handle: 1 )
[14:58:49] CMySQLHandler::Query(SELECT * FROM accounts WHERE name = '
asdasdasas') - Successfully executed.
[14:58:49] >> mysql_store_result( Connection handle: 1 )
[14:58:49] CMySQLHandler::StoreResult() - Result was stored.
[14:58:49] >> mysql_fetch_row_format( Connection handle: 1 )
[14:58:49] CMySQLHandler::FetchRow() - Return: 46|asdasdasas|123123|213.88.102.254|0|qwerty|123@123.com|3|1000000|0|0|05.04.2013|0|0|0|0|1|79|0|0, 0, 0, 0, 0|0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0|0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0|5000|0|0|0|1|0, 0, 0|0, 0, 0|0|0|0|0|None|None|70.0|0|0|0|0|0|None|123|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|100|0|100|0|0|0|0|0|0|0|0|1|0|100|0|462|4|200|0|0|1|0|0,0,0,0,0,0,0,0,0,0,0,0,0,0|3|0|0|0|0|0|
[14:58:49] >> mysql_free_result( Connection handle: 1 )
[14:58:49] CMySQLHandler::FreeResult() - Result was successfully free'
d.
[
14:58:51] >> mysql_queryConnection handle)
[
14:58:51CMySQLHandler::Query(SELECT password FROM accounts WHERE name 'asdasdasas' LIMIT 1) - Successfully executed.
[
14:58:51] >> mysql_store_resultConnection handle)
[
14:58:51CMySQLHandler::StoreResult() - Result was stored.
[
14:58:51] >> mysql_fetch_row_formatConnection handle)
[
14:58:51CMySQLHandler::FetchRow() - Return: 123123
[14:58:51] >> mysql_free_resultConnection handle)
[
14:58:51CMySQLHandler::FreeResult() - Result was successfully free'd.
[14:58:51] >> mysql_query( Connection handle: 1 )
[14:58:51] CMySQLHandler::Query(SELECT ipcheck FROM accounts WHERE name = '
asdasdasas' LIMIT 1) - Successfully executed.
[14:58:51] >> mysql_store_result( Connection handle: 1 )
[14:58:51] CMySQLHandler::StoreResult() - Result was stored.
[14:58:51] >> mysql_fetch_row_format( Connection handle: 1 )
[14:58:51] CMySQLHandler::FetchRow() - Return: 0
[14:58:51] >> mysql_free_result( Connection handle: 1 )
[14:58:51] CMySQLHandler::FreeResult() - Result was successfully free'
d.
[
14:58:51] >> mysql_queryConnection handle)
[
14:58:51CMySQLHandler::Query(SELECT FROM accounts WHERE name 'asdasdasas'  LIMIT 1) - Successfully executed.
[
14:58:51] >> mysql_store_resultConnection handle)
[
14:58:51CMySQLHandler::StoreResult() - Result was stored.
[
14:58:51] >> mysql_fetch_row_formatConnection handle)
[
14:58:51CMySQLHandler::FetchRow() - Return: 46|asdasdasas|123123|213.88.102.254|0|qwerty|123@123.com|3|1000000|0|0|05.04.2013|0|0|0|0|1|79|0|00000|0000000000000|0000000000000|5000|0|0|0|1|000|000|0|0|0|0|None|None|70.0|0|0|0|0|0|None|123|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|100|0|100|0|0|0|0|0|0|0|0|1|0|100|0|462|4|200|0|0|1|0|0,0,0,0,0,0,0,0,0,0,0,0,0,0|3|0|0|0|0|0|
[
14:58:51] >> mysql_free_resultConnection handle)
[
14:58:51CMySQLHandler::FreeResult() - Result was successfully free'd. 
Авторизация:
PHP код:
        case D_LOGIN:
        {
            for(new 
strlen(inputtext); != 0; --i)
            switch(
inputtext[i])
            {
                case 
'А'..'Я''а'..'я'' ':
                return 
ShowPlayerDialog(playerid,D_ERRORPAS,DIALOG_STYLE_MSGBOX,"Ошибка!","{00FF21}Введенный вами пароль содержит русские буквы.\nСмените раскладку клавиатуры!","Повторить","");
            }
            if(
response)
            {
                if(!
strlen(inputtext))
                {
                    
format(string412"{FF9900}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\tДобро пожаловать на сервер {FF9900}HARD-RP{FFFFFF}\n\nАккаунт с именем: {FF9900}%s{FFFFFF} зарегестрирован\nПожалуйста пройдите авторизацию\nНаш сайт: {FF9900}HARD-RP.RU\n\n{FFFFFF}Введите пароль:\n{FF9900}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",PlayerInfo[playerid][pSendername]);
                    
ShowPlayerDialog(playeridD_LOGIN3"{FFFFFF}Авторизация"string"Готово","Отмена");
                }
                   else if(!
strcmp(inputtextGetAccount(PlayerInfo[playerid][pSendername], "password"), true))
                  {
                      new 
ipcheckon strval(GetAccount(PlayerInfo[playerid][pSendername], "ipcheck"));
                    new 
pip[32];
                    
GetPlayerIp(playerid,pip,sizeof(pip));
                     if(
ipcheckon == && !strcmp(pipGetAccount(PlayerInfo[playerid][pSendername], "ippassword"), true))
                    {
                        
format(string256"    ==== Ваш IP адрес сменился ====\n=== Введите Ваш ключ безопасности ===",PlayerInfo[playerid][pSendername]);
                        
ShowPlayerDialog(playerid123413"Введите ключ безопастности"string"Принять","Отмена");
                    }
                    else
                    {
                          
LoadAccount(playerid);
                      }
                      return 
1;
                  }
                else
                {
                    new 
logtires PlayerLogTries[playerid];
                    
PlayerLogTries[playerid]++;
                    if(
PlayerLogTries[playerid] == 4) { SendClientMessage(playerid,COLOR_LIGHTRED"Вы были кикнуты по подозрению в взломе {ffffff}/q(uit)"); Kick(playerid); }
                    
format(string,128,"{FF6347}Вы ввели неверный пароль уже {FFFFFF}%d/3 раз\n{FF6347}На 3 раз вы будете отключены от сервера",logtires);
                    
ShowPlayerDialog(playeridD_ERRORPAS,DIALOG_STYLE_MSGBOX,"Ошибка!",string,"Повтор","Выйти");
                }
            }
            else { 
SendClientMessage(playeridCOLOR_LIGHTRED""PlayerNeedToLoggedForToPlay""); Kick(playerid); }
        } 
Код выбора скина:
PHP код:
        case D_SEX:
        {
            new 
sex[20];
            switch(
response)
            {
                case 
1: { sex "Мужской"PlayerInfo[playerid][pSex] = 1; }
                default: { 
sex "Женский" PlayerInfo[playerid][pSex] = 2; }
            }
            
ClothesRound[playerid] = 1;
            
PlayerLogged[playerid] = true;
            
SetHealth(playerid70);
            
SetSpawnInfo(playerid255PlayerInfo[playerid][pModel], 0001.0, -1, -1, -1, -1, -1, -1);
            
SpawnPlayer(playerid);
            
//CreateAccount(playerid, PlayerInfo[playerid][pPassword]);
        

Reply
#4

Покажите CreateAccount LoadAccount GetAccount
Reply
#5

PHP код:
stock CreateAccount(playeridpass[])
{
    if(
IsTextInvalid(pass)) return SendClientMessage(playerid,-1,"В пароле должны быть только буквы и цифры"),Kick(playerid);
    new 
ip[16],data[16];
    
format(data16"%s",date("%dd.%mm.%yyyy",gettime()));
    
GetPlayerIp(playeridip16);
    
format(query512"INSERT INTO "TABLE_ACCOUNT" (name, password, ip, datareg, sex, model, news, mail, referal) VALUES ('%s', '%s', '%s', '%s', %d , %d, %d, '%s', '%s')"
    
PlayerInfo[playerid][pSendername], passipdata,PlayerInfo[playerid][pSex], PlayerInfo[playerid][pModel], 1PlayerInfo[playerid][pMail], PlayerInfo[playerid][pReferal]);
    
mysql_query(query);
    
LoadAccount(playerid);
    return 
1;

PHP код:
stock LoadAccount(playerid)
{
    new 
string[64];
    new 
playername[32];
    
GetPlayerName(playerid,playername,32);
    
format(query,256"SELECT * FROM "TABLE_ACCOUNT" WHERE name = '%s'  LIMIT 1",playername);
    
mysql_query(query);
    
mysql_store_result();
    if(
mysql_fetch_row(query) == 1)
      {
        
sscanf(query"p<|>is[32]s[32]s[16]is[32]s[64]iiiis[16]iiiiiiis[16]s[40]s[160]iiiiis[16]s[20]iiiis[32]s[32]fiiiiis[32]s[32]iiiiiiiiiiiiiiiiiiiiiiifiiiiiiiiiiiiiiiiiiis[128]iiiiiis[32]",
        
PlayerInfo[playerid][pID],
        
PlayerInfo[playerid][pSendername],
        
PlayerInfo[playerid][pPassword],
        
PlayerInfo[playerid][pIP],
        
PlayerInfo[playerid][pAdmin],
        
PlayerInfo[playerid][pIpPassword],
        
PlayerInfo[playerid][pMail],
         
PlayerInfo[playerid][pLevel],
         
PlayerInfo[playerid][pCash],
         
PlayerInfo[playerid][pBank],
         
PlayerInfo[playerid][pExp],
         
PlayerInfo[playerid][pRegData],
         
PlayerInfo[playerid][pLeader],
         
PlayerInfo[playerid][pMember],
         
PlayerInfo[playerid][pRank],
        
PlayerInfo[playerid][pWarn],
        
PlayerInfo[playerid][pSex],
        
PlayerInfo[playerid][pModel],
        
PlayerInfo[playerid][pChar],
        
PlayerInfo[playerid][pLics],
           
PlayerInfo[playerid][pGuns],
         
PlayerInfo[playerid][pAmmos],
         
PlayerInfo[playerid][pGunSkill][6],
        
PlayerInfo[playerid][pMuted],
        
PlayerInfo[playerid][pPick],
        
PlayerInfo[playerid][pCheckTime],
        
PlayerInfo[playerid][pNews],
        
PlayerInfo[playerid][pPhones],
        
PlayerInfo[playerid][pTexts],
        
PlayerInfo[playerid][pJail],
        
PlayerInfo[playerid][pJailTime],
        
PlayerInfo[playerid][pWanted],
        
PlayerInfo[playerid][pWantedTime],
        
PlayerInfo[playerid][pWantedWho],
        
PlayerInfo[playerid][pWantedReason],
        
PlayerInfo[playerid][pHeal],
        
PlayerInfo[playerid][pDrugs],
        
PlayerInfo[playerid][pMats],
        
PlayerInfo[playerid][pCrimes],
        
PlayerInfo[playerid][pJob],
        
PlayerInfo[playerid][pMarried],
        
PlayerInfo[playerid][pWhoMarried],
        
PlayerInfo[playerid][pReferal],
        
PlayerInfo[playerid][pRefMoney],
        
PlayerInfo[playerid][pPayCheck],
        
PlayerInfo[playerid][pFish],
        
PlayerInfo[playerid][pLottery],
        
PlayerInfo[playerid][pVIP],
        
PlayerInfo[playerid][pTime],
        
PlayerInfo[playerid][pFightStyle],
        
PlayerInfo[playerid][pCredits],
        
PlayerInfo[playerid][pTotalCredits],
        
PlayerInfo[playerid][pSkin1],
        
PlayerInfo[playerid][pSkin2],
        
PlayerInfo[playerid][pSkin3],
        
PlayerInfo[playerid][pSpawnChange],
        
PlayerInfo[playerid][pGunSkill][0],
        
PlayerInfo[playerid][pGunSkill][1],
        
PlayerInfo[playerid][pGunSkill][2],
        
PlayerInfo[playerid][pGunSkill][3],
        
PlayerInfo[playerid][pGunSkill][4],
        
PlayerInfo[playerid][pGunSkill][5],
        
PlayerInfo[playerid][pRPR],
        
PlayerInfo[playerid][pGlasses],
        
PlayerInfo[playerid][pSatiety],
        
PlayerInfo[playerid][pRPRGive],
        
PlayerInfo[playerid][pHealthS],
        
PlayerInfo[playerid][pSportEXP],
        
PlayerInfo[playerid][pOnline],
        
PlayerInfo[playerid][pZakon],
        
PlayerInfo[playerid][pBolezn],
        
PlayerInfo[playerid][ProverkaIP],
        
PlayerInfo[playerid][pHospital],
        
PlayerInfo[playerid][pWatch],
        
PlayerInfo[playerid][pCiggare],
        
PlayerInfo[playerid][pSprunk],
        
PlayerInfo[playerid][pMask],
        
PlayerInfo[playerid][pPhoneBalance],
        
PlayerInfo[playerid][pTruckSkill],
        
PlayerInfo[playerid][cModel],
        
PlayerInfo[playerid][cClass],
        
PlayerInfo[playerid][cFuel],
        
PlayerInfo[playerid][cColor][0],
        
PlayerInfo[playerid][cColor][1],
        
PlayerInfo[playerid][cLock],
        
PlayerInfo[playerid][cCost],
        
PlayerInfo[playerid][cVehcom],
        
PlayerInfo[playerid][cPaintjob],
        
PlayerInfo[playerid][pProc],
        
PlayerInfo[playerid][pZavisimost],
        
PlayerInfo[playerid][pArestov],
        
PlayerInfo[playerid][pWantedKills],
        
PlayerInfo[playerid][pTotalWarns],
        
PlayerInfo[playerid][pLastIP]);
         
mysql_free_result();
         
sscanf(PlayerInfo[playerid][cVehcom], "p<,>a<i>[14]",PlayerInfo[playerid][cVehcoms]);
        
LoadMyCar(playerid);
        
PlayerLogged[playerid] = true;
        
TimeLogged[playerid] = -1;
        
sscanf(PlayerInfo[playerid][pTexts], "p<,>a<i>[3]"PlayerInfo[playerid][pText]);
        
sscanf(PlayerInfo[playerid][pPhones], "p<,>a<i>[3]"PlayerInfo[playerid][pPhone]);
        
sscanf(PlayerInfo[playerid][pLics], "p<,>a<i>[5]",PlayerInfo[playerid][pLic]);
        if(
PlayerInfo[playerid][pVIP] > 1SendClientMessage(playerid0xFEBC41AA"Здравствуйте VIP игрок!");
        if(
PlayerInfo[playerid][pAdmin] > 0AdminLogged[playerid] = trueSendMes(playeridCOLOR_REDD,"Вы вошли как модератор %d уровня",PlayerInfo[playerid][pAdmin]);
        
format(string64"~w~Welcome ~n~~b~   %s"PlayerInfo[playerid][pSendername]);
        
GameTextForPlayer(playeridstring35001);
        if (
PlayerInfo[playerid][pText][0] == 1)
        {
            
SendClientMessage(playeridCOLOR_YELLOW"Ваш дом был продан гос-ву за неуплату квартплаты");
            
SendClientMessage(playeridCOLOR_YELLOW"Ваши деньги за дом были перечислены на ваш счет");
            
PlayerInfo[playerid][pText][0] = 0;
            
format(PlayerInfo[playerid][pTexts], 20,  "%i, %i, %i"PlayerInfo[playerid][pText][0], PlayerInfo[playerid][pText][1], PlayerInfo[playerid][pText][2]);
            
format(query256"UPDATE "TABLE_ACCOUNT" SET text = '%s' WHERE name = '%s'"PlayerInfo[playerid][pTexts], PlayerInfo[playerid][pSendername]);
            
mysql_query(query);
        }
        if(
PlayerInfo[playerid][pText][1] == 1)
        {
            
SendClientMessage(playeridCOLOR_YELLOW,"Ваш бизнес был продан гос-ву за неуплату налогов");
            
SendClientMessage(playeridCOLOR_YELLOW,"Ваши деньги за бизнес были перечислены на ваш счет");
            
PlayerInfo[playerid][pText][1] = 0;
            
format(PlayerInfo[playerid][pTexts], 20"%i, %i, %i"PlayerInfo[playerid][pText][0], PlayerInfo[playerid][pText][1], PlayerInfo[playerid][pText][2]);
            
format(query256"UPDATE "TABLE_ACCOUNT" SET text = '%s' WHERE name = '%s'"PlayerInfo[playerid][pTexts], PlayerInfo[playerid][pSendername]);
            
mysql_query(query);
        }
        if(
PlayerInfo[playerid][pText][2] == 1)
        {
            new 
PlayerInfo[playerid][pRefMoney] / 100000;
            for(new 
1<= pi++)
            {
                
GiveMoney(playerid100000);
                
PlayerInfo[playerid][pRefMoney] -= 100000;
            }
            
PlayerInfo[playerid][pText][2] = 0;
            
format(PlayerInfo[playerid][pTexts], 20"%i, %i, %i"PlayerInfo[playerid][pText][0], PlayerInfo[playerid][pText][1], PlayerInfo[playerid][pText][2]);
            
format(query256"UPDATE "TABLE_ACCOUNT" SET text = '%s', refmoney WHERE name = '%s'"PlayerInfo[playerid][pTexts], PlayerInfo[playerid][pRefMoney], PlayerInfo[playerid][pSendername]);
            
mysql_query(query);
        }
        if(
PlayerInfo[playerid][pGunSkill][6] >= NORM_SKILLS_PLAYERVehRe[playerid] = true;
          
SetSpawnInfo(playerid255PlayerInfo[playerid][pModel], 0001.0, -1, -1, -1, -1, -1, -1);
        
SpawnPlayer(playerid);
        new 
str123[12];
        
GetPlayerIp(playerid,str123,12);
        
format(string64"%s зашел в аккаунт с ip: %s",PlayerInfo[playerid][pSendername],str123);
        
Log("LogInfo",string);
        
DeletePVar(playerid,"Acc");
        
SetPlayerInt(PlayerInfo[playerid][pSendername], "online"1);
    }
    return 
1;

PHP код:
stock GetAccount(username[], obtaining[])
{
    new 
Query[128];
    
format(Query128"SELECT %s FROM "TABLE_ACCOUNT" WHERE name = '%s' LIMIT 1"obtainingusername);
    
mysql_query(Query);
    
mysql_store_result();
    if(
mysql_fetch_row(Query) == 1)
    {
        
mysql_free_result();
        return 
Query;
    }
    return 
Query;

Reply
#6

А какой размер массива query?
Просто судя по логам, вот сюда:
if(mysql_fetch_row(query) == 1)
{
Могла банально не влезть вся строка.

И проверьте версии плагина.
Reply
#7

new query[2048];

Версии вроде бы совпадают, т.к на прошлом хостинге все работало.
Reply
#8

А в самом логе сервера, ничего подозрительного нету?
Reply
#9

PHP код:
[14:22:29]  Loading pluginstreamer.so
[14:22:29
*** 
Streamer Plugin v2.6 by Incognito loaded ***
[
14:22:29]   Loaded.
[
14:22:29]  Loading pluginsscanf.so
[14:22:29
[
14:22:29]  ===============================
[
14:22:29]       sscanf plugin loaded.     
[
14:22:29]    (c2009 Alex "******" Cole
[14:22:29]    0.3d-R2 500 Players "dnee"
[14:22:29]  ===============================
[
14:22:29]   Loaded.
[
14:22:29]  Loading pluginmysql.so
[14:22:29
  > 
MySQL plugin R5 successfully loaded.
[
14:22:29]   Loaded.
[
14:22:29]  Loading plugincrashdetect.so
[14:22:29]   CrashDetect v4.10 is OK.
[
14:22:29]   Loaded.
[
14:22:29]  Loaded 4 plugins
Вот загрузка плагинов, вроде все нормально
Reply
#10

Имеется ввиду в момент выключения. И да у sscanf очень устаревшая версия, тогда она выпускалась еще ориентированной под определенную версию сервера, видимо, что именно в этом дело.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)