Alferov Posted June 11, 2007 Author Posted June 11, 2007 Ачуметь, ждемс с нетерпением.) Готова. Версия 0.03 Брать здесь: http://alf.uzlovaya.ru/stg/stg-web/ В архиве также лежит модуль mysql 0.63 (два варианта): 1. mod_store_mysql_0.63.tar.gz - оригинальный модуль 2. mod_store_mysql_0.63_FOR_STG-WEB.tar.gz - моя сборка, содержащая необходимые изменения. (патч в случае использования этой сборки накладывать не требуется!) Как обновлять - см. stg-web_0.03.txt, радел Update. К сожалению в эту версию не попали наработки по изменению тарифа самими юзерами (в следующую включу обязательно).
zulu_Radist Posted June 11, 2007 Posted June 11, 2007 А у меня не компилется патченный мускуль... core mysql # ./build ############################################################################# Building STG Mysql Module 0.63 for Linux ############################################################################# Makefile:57: deps: No such file or directory g++ -c mysql_store.cpp -g3 -Wall -fPIC -I ../../../../../include -I /usr/include/mysql -DLINUX ../../../../../include/base_store.h:25: warning: 'class BASE_STORE' has virtual functions but non-virtual destructor mysql_store.cpp: In constructor 'STORE_CREATOR::STORE_CREATOR()': mysql_store.cpp:121: error: cannot allocate an object of abstract type 'MYSQL_STORE' mysql_store.h:51: note: because the following virtual functions are pure within 'MYSQL_STORE': ../../../../../include/base_store.h:43: note: virtual int BASE_STORE::WriteUserConnect(const std::string&, uint32_t) const ../../../../../include/base_store.h:50: note: virtual int BASE_STORE::WriteUserDisconnect(const std::string&, const DIR_TRAFF&, const DIR_TRAFF&, const DIR_TRAFF&, const DIR_TRAFF&, double) const ../../../../../include/base_store.h:54: note: virtual int BASE_STORE::WriteDetailedStat(const std::map<IP_DIR_PAIR, STAT_NODE, std::less<IP_DIR_PAIR>, std::allocator<std::pair<const IP_DIR_PAIR, STAT_NODE> > >*, time_t, const std::string&) const mysql_store.cpp: In member function 'int MYSQL_STORE::MysqlQuery(const char*) const': mysql_store.cpp:235: warning: suggest parentheses around assignment used as truth value mysql_store.cpp:240: warning: suggest parentheses around assignment used as truth value mysql_store.cpp: In member function 'virtual int MYSQL_STORE::SaveUserStat(const USER_STAT&, const std::string&) const': mysql_store.cpp:1101: error: 'const struct USER_STAT' has no member named 'sup' mysql_store.cpp:1101: error: 'const struct USER_STAT' has no member named 'sdown' mysql_store.cpp:1101: error: 'const struct USER_STAT' has no member named 'sid' gmake: *** [mysql_store.o] Error 1 Кто-то мне говорил нужно прилагать... core mysql # cat deps mysql_store.o: mysql_store.cpp /usr/include/mysql/mysql.h \ /usr/include/mysql/mysql_version.h /usr/include/mysql/mysql_com.h \ /usr/include/mysql/mysql_time.h /usr/include/mysql/typelib.h \ /usr/include/mysql/my_alloc.h /usr/include/mysql/my_list.h \ /usr/include/mysql/errmsg.h ../../../../../include/common.h \ ../../../../../include/blowfish.h ../../../../../include/stg_const.h \ ../../../../../include/user_ips.h ../../../../../include/user_ips.h \ ../../../../../include/common.h ../../../../../include/user_conf.h \ ../../../../../include/resetable.h ../../../../../include/user_stat.h \ ../../../../../include/user_traff.h ../../../../../include/stg_const.h \ mysql_store.h ../../../../../include/base_settings.h \ ../../../../../include/base_store.h ../../../../../include/user_stat.h \ ../../../../../include/user_conf.h ../../../../../include/corp_conf.h \ ../../../../../include/service_conf.h \ ../../../../../include/admin_conf.h \ ../../../../../include/tariff_conf.h \ ../../../../../include/base_settings.h \ ../../../../../include/stg_message.h ../../../../../include/conffiles.h \ ../../../../../include/user_traff.h ../../../../../include/blowfish.h \ ../../../../../include/stg_logger.h Makefile $(CC) -c $< -g3 -Wall -fPIC -I ../../../../../include -I /usr/include/mysql -DLINUX
Render_ Posted June 11, 2007 Posted June 11, 2007 А phpinfo() по поводу xml что говорит? Expat какой версии? При сборке php не был ли он отключен? Не был включен xml в php, после пересборки все заработало. Огромное спасибо! zulu_Radist, если у тебя линукс попробуй выключить mysql, и собрать командой make, а не через build.
zulu_Radist Posted June 11, 2007 Posted June 11, 2007 а непропатченный мускл компилится? Да, в этом весь и прикол. =) если у тебя линукс попробуй выключить mysql, и собрать командой make, а не через build. тоже самое... :-/
Alferov Posted June 11, 2007 Author Posted June 11, 2007 Ясно. Тогда значит надо идти другим путем. )) Т.е. брать чистые (без патча) стг и модуль, накатывать на них патч и собирать.
zulu_Radist Posted June 11, 2007 Posted June 11, 2007 Ясно. Тогда значит надо идти другим путем. ))Т.е. брать чистые (без патча) стг и модуль, накатывать на них патч и собирать. Та догадался уже... сейчас буду пробовать, отпишусь
dnserg Posted June 11, 2007 Posted June 11, 2007 Не пойму зачем самому компилить, если автор специально уже скомпилил готовый пропатченый модуль...
Alferov Posted June 11, 2007 Author Posted June 11, 2007 Ничего я не компилил. Я просто выложил уже пропатченные исходники. А компилить надо самостоятельно.
dnserg Posted June 11, 2007 Posted June 11, 2007 Понял, ну у мня все изначально получилося, так что я даже тот архив не смарел )) Может стоило сразу скомпилить ? )) Упс, походу я глупанул, модуль то у меня старой версии
dnserg Posted June 11, 2007 Posted June 11, 2007 Storage plugin: mysql_store v.0.63 (Alf). Loading successfull. Все гуд, автору респект за оперативность
zulu_Radist Posted June 11, 2007 Posted June 11, 2007 Пересобрал и пропатчил все с нуля. Скомпилелось без проблем. Модуль работает. Спасибо аффтару! (Max и Alferov респект Вам) 2007-06-12 02:30:35 -- Stg v. Stg 2.403b 2007-06-12 02:30:35 -- Message queue created successfully. msgKey=5555 msgID=0 2007-06-12 02:30:35 -- Timer thread started successfully. 2007-06-12 02:30:35 -- Storage plugin: mysql_store v.0.63 (Alf). Loading successfull. 2007-06-12 02:30:35 -- Users started successfully. 2007-06-12 02:30:35 -- User: tester. Credit expired. 2007-06-12 02:30:35 -- Traffcounter started successfully. 2007-06-12 02:30:35 -- Module: 'Ether_cap v.1.0'. Start successfull. 10 2007-06-12 02:30:35 -- Module: 'InetAccess authorizator v.1.1'. Start successfull. 50 2007-06-12 02:30:35 -- Module: 'Always Online authorizator v.1.0'. Start successfull. 70 2007-06-12 02:30:35 -- Module: 'Pinger v.1.01'. Start successfull. 100 2007-06-12 02:30:35 -- Module: 'Stg configurator v.0.05'. Start successfull. 220 2007-06-12 02:30:35 -- Stg started successfully. 2007-06-12 02:30:35 -- +++++++++++++++++++++++++++++++++++++++++++++ З.Ы. упс ток заметил что время на сервере неверное )))
Cell Posted June 14, 2007 Posted June 14, 2007 Все заработало с 1/4 пинка ))) большое спасибо. Даже логи сервера появились )
Cell Posted June 17, 2007 Posted June 17, 2007 Вопрос к автору: как правильно заюзать? if (!$admin) $message.=" ************************************************************************ Ваш администратор: ФИО: $f_admin Телефон: $f_admin_tel_r ICQ: $f_admin_icq E-Mail: <a href=mailto:$f_admin_email>$f_admin_email</a> ************************************************************************\n"; и $stg_config_ud_tbl = "web_stg_config_ud"; // таблица с описанием полей UserData
gall Posted June 19, 2007 Posted June 19, 2007 Подскажите что не так. Захожу в админку без проблем, меняю тарифы, админов, юзеров... А когда жму на дилеров, карточки, статистику и т.д. получаю "аксес денайд" Что неправильно? .... В юзерской части. Кидаю денег в кредит, в логах пишет дату окончания кредита правильно +3 дня. А в веб морде пишет что осталось 0 дней. Время на компе синхронизируется каждый час.
Alferov Posted June 19, 2007 Author Posted June 19, 2007 1. Зайди в управление администраторами и поставь там права на доступ к этому разделу. 2. Вечером проверю. По результатам отпишусь.
gall Posted June 19, 2007 Posted June 19, 2007 1. Все галки поставил...все работает))) спасибо 2. жду .... 3. Обьясните пожалуйста как действует перевод денег на другой счет. Я так понял, что комисия вычитается из суммы перевода. Пример... комисионные - 2грн. юзер№1 - баланс - 5грн. юзер№2 - баланс - 1грн. юзер№1 переводит юзеру№2 - 1грн. итог.. юзер№1 - остаток - 4грн. а вот юзер№2 загнан на 1грн. в минуса. ИМХО не гуд Думаю комисионные нада не вычитать из суммы перевода, а снимать с отправителя. Какие ваши мнения по данному вопросу?
Cell Posted June 19, 2007 Posted June 19, 2007 2. Вечером проверю. По результатам отпишусь. Да, есть такая фишка... и еще... когда заканчивается срок для кредита... доступ в тырнет прекращается и это нормально ))) а в вебморде понять о том что время закончилось можно только коственно по цифрам... и то не сразу а напрягаясь... было бы неплохо чтобы сразу выдно было больфие красные букафки )))
finger Posted June 21, 2007 Posted June 21, 2007 Все скомпилилось окей Робит и в базу пишит Но когда никто не работает на серваке то Старик падает в логах неразбериха и непонятно что такое вот лог. 2007-06-20 17:43:22 -- Stg v. Stg 2.403b 2007-06-20 17:43:22 -- Message queue created successfully. msgKey=5555 msgID=32768 2007-06-20 17:43:22 -- Timer thread started successfully. 2007-06-20 17:43:23 -- Storage plugin: mysql_store v.0.63 (Alf). Loading successfull. 2007-06-20 17:43:23 -- Users started successfully. 2007-06-20 17:43:23 -- Traffcounter started successfully. 2007-06-20 17:43:23 -- Module: 'Ether_cap v.1.0'. Start successfull. 10 2007-06-20 17:43:23 -- Module: 'InetAccess authorizator v.1.1'. Start successfull. 50 2007-06-20 17:43:23 -- Module: 'Always Online authorizator v.1.0'. Start successfull. 70 2007-06-20 17:43:23 -- Module: 'Pinger v.1.01'. Start successfull. 100 2007-06-20 17:43:23 -- Module: 'Stg configurator v.0.05'. Start successfull. 220 2007-06-20 17:43:23 -- Stg started successfully. 2007-06-20 17:43:23 -- +++++++++++++++++++++++++++++++++++++++++++++ 2007-06-20 18:50:00 -- Cannot write detail stat for user zero. 2007-06-20 18:50:00 -- Couldn't get table detailstat_06_2007: Lost connection to MySQL server during query 2007-06-20 22:25:53 -- Cannot write connect for user smoke. 2007-06-20 22:25:53 -- Couldn't write action (Connect) for user smoke string: Commands out of sync; You can't run this command now 2007-06-20 23:30:00 -- Cannot write detail stat for user zero. 2007-06-20 23:30:00 -- Couldn't get table detailstat_06_2007: Lost connection to MySQL server during query 2007-06-21 00:05:32 -- Admin 'admin', 10.1.1.3: User 'demon': 'cash' parameter changed from '0.305103' to '100.305'. 2007-06-21 00:15:51 -- Shutting down... 15 2007-06-21 00:15:51 -- +++++++++++++++++++++++++++++++++++++++++++++ 2007-06-21 00:19:24 -- Stg v. Stg 2.403b 2007-06-21 00:19:24 -- Message queue created successfully. msgKey=5555 msgID=0 2007-06-21 00:19:24 -- Timer thread started successfully. 2007-06-21 00:19:24 -- Storage plugin: mysql_store v.0.63 (Alf). Loading successfull. 2007-06-21 00:19:24 -- Users started successfully. 2007-06-21 00:19:24 -- Traffcounter started successfully. 2007-06-21 00:19:24 -- Module: 'Ether_cap v.1.0'. Start successfull. 10 2007-06-21 00:19:24 -- Module: 'InetAccess authorizator v.1.1'. Start successfull. 50 2007-06-21 00:19:24 -- Module: 'Always Online authorizator v.1.0'. Start successfull. 70 2007-06-21 00:19:24 -- Module: 'Pinger v.1.01'. Start successfull. 100 2007-06-21 00:19:24 -- Module: 'Stg configurator v.0.05'. Start successfull. 220 2007-06-21 00:19:24 -- Stg started successfully. 2007-06-21 00:19:24 -- +++++++++++++++++++++++++++++++++++++++++++++ 2007-06-21 00:19:36 -- Cannot write connect for user zero. 2007-06-21 00:19:36 -- Couldn't write action (Connect) for user zero string: No Database Selected 2007-06-21 00:19:58 -- Cannot write connect for user demon. 2007-06-21 00:19:58 -- Couldn't write action (Connect) for user demon string: No Database Selected 2007-06-21 00:20:00 -- Cannot write detail stat for user zero. 2007-06-21 00:20:00 -- Couldn't get table detailstat_06_2007: No Database Selected 2007-06-21 00:20:00 -- Cannot write detail stat for user nikita. 2007-06-21 00:20:00 -- Couldn't get table detailstat_06_2007: No Database Selected что может значить???
Alferov Posted June 22, 2007 Author Posted June 22, 2007 Это проблема с линком между стг и mysql-сервером. stg-web тут не при чем.
finger Posted June 22, 2007 Posted June 22, 2007 Ето лечится или надо Мускул новее у меня просто Федора 3 все робит без мускула гудд а с мускулом вот такая ботва((( может есть способ лечения ??? Переставить сам Мускул так ленива ваще)))
gall Posted June 25, 2007 Posted June 25, 2007 Еще один вопрос. Если создаю юзера через конфигуратор, то в веб админке не видно его имени При создании через веб все нормально. Почему? .... Вопрос времени кредита остается открытым. .... Будет ли реализована возможность смены тарифа юзером?
Alferov Posted June 25, 2007 Author Posted June 25, 2007 1. это происходит потому, что СТГ не записывает юзера в базу сразу при создании. Запись юзера происходит по истечении времени, определенного в конфиге СТГ. Потому stg-web и не видит юзера. 2. Поправлю обязательно. Времени не хватает на все. 3. Будет. см.п.2
Recommended Posts