Перейти до

Storoge

Маглы
  • Всього повідомлень

    27
  • Приєднався

  • Останній візит

Сообщения додав Storoge

  1.  SELECT * from `users` WHERE `login`="ad_aegorin";
    +------------+----------+---------+------+--------------+--------+---------+-------+-------+------+-----------+-------------------------------+--------+--------------+-----------+------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+--------------+------+-----------+----------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+--------+-------------+-----------------+-------------+------------------+-----+
    | login      | Password | Passive | Down | AlwaysOnline | Tariff | Address | Phone | Email | Note | RealName  | StgGroup                      | Credit | TariffChange | Userdata0 | Userdata1  | Userdata2 | Userdata3 | Userdata4 | Userdata5 | Userdata6 | Userdata7 | Userdata8 | Userdata9 | CreditExpire | IP   | D0        | U0       | D1   | U1   | D2   | U2   | D3   | U3   | D4   | U4   | D5   | U5   | D6   | U6   | D7   | U7   | D8   | U8   | D9   | U9   | Cash | FreeMb | LastCashAdd | LastCashAddTime | PassiveTime | LastActivityTime | NAS |
    +------------+----------+---------+------+--------------+--------+---------+-------+-------+------+-----------+-------------------------------+--------+--------------+-----------+------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+--------------+------+-----------+----------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+--------+-------------+-----------------+-------------+------------------+-----+
    | ad_aegorin | 9iQVbnfL |       0 |    0 |            0 | tariff |         |       |       |      | Егорин А. | Кафедра :Автомобильные дороги |      0 |              | 60.000000 | 10.4.23.43 |           |           |           |           |           |           |           |           |            0 | *    | 485982492 | 35266434 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |   60 |      0 |   46.871451 |      1233453600 |     2332800 |       1264156218 |     |
    +------------+----------+---------+------+--------------+--------+---------+-------+-------+------+-----------+-------------------------------+--------+--------------+-----------+------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+--------------+------+-----------+----------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+--------+-------------+-----------------+-------------+------------------+-----+
    1 row in set (0.00 sec)

  2. Хочу перейти с Stg 2.404 на Stg 2.406. База данных на mysql.

    Ось -FreeBSD 7.2. Все нормально собралось.

    В базе ничего не менял.

    При запуске нового старгазера в логах следующее:

    ^@2010-01-21 23:41:34 -- Stg v. 2.406
    2010-01-21 23:41:34 -- Message queue created successfully. msgKey=5555 msgID=196608
    2010-01-21 23:41:34 -- Timer thread started successfully.
    2010-01-21 23:41:34 -- Storage plugin: mysql_store v.0.67. Loading successfull.
    2010-01-21 23:41:34 -- Cannot read conf for user ad_aegorin.
    2010-01-21 23:41:34 -- Couldn't restore Tariff(on query):
    Unknown column 'DisabledDetailStat' in 'field list'
    2010-01-21 23:41:34 -- USERS: Error: Cannot read users!
    2010-01-21 23:41:34 -- Traffcounter: Stop successfull.
    2010-01-21 23:41:34 -- Users: Stop successfull.
    2010-01-21 23:41:35 -- Queue removed successfully.
    2010-01-21 23:41:35 -- StgTimer: Stop successfull.
    2010-01-21 23:41:35 -- Stg stopped successfully.

    Я так понял, изменилась структура базы.

    Нет ли уже готового скрипта для конвертации.

  3. ./sgconf_xml -s 127.0.0.1 -p 5555 -a admin -w xxxxxxx -r '<GetServerInfo/>'
    <ServerInfo>
    <version>Stargazer 2.4.04</version>
    <tariff_num>1</tariff_num>
    <tariff>2</tariff>
    <users_num>269</users_num>
    <uname>FreeBSD 7.0-STABLE i386 cs.bgita2.ru</uname>
    <dir_num>10</dir_num>
    <day_fee>1</day_fee>
    <dir_name_0>jeogehfgchogfgeh</dir_name_0>
    <dir_name_1></dir_name_1>
    <dir_name_2></dir_name_2>
    <dir_name_3></dir_name_3>
    <dir_name_4></dir_name_4>
    <dir_name_5></dir_name_5>
    <dir_name_6></dir_name_6>
    <dir_name_7></dir_name_7>
    <dir_name_8></dir_name_8>
    <dir_name_9></dir_name_9>
    </ServerInfo>
    <!-- Ok -->

  4. Давно работаю со Stargazer, но использовал раньше виндовый конфигуратор.

    Попробовал поставить web-интерфейс.

    Вот настройки:

    // DATABASE Settings
    $sql["host"]   = "localhost";		   // ЮДПЕЯ ЯЕПБЕПЮ MySQL
    $sql["base"]   = "stg";				 // ХЛЪ АЮГШ ДЮММШУ
    $sql["login"]  = "stg_user";			// ХЛЪ ОНКЭГНБЮРЕКЪ ДКЪ ДНЯРСОЮ Й ад
    $sql["passwd"] = "xxxxxxxx";			// ОЮПНКЭ ДКЪ ДНЯРСОЮ Й ад
    $sql["charset"]= "cp1251";			  // ЙНДХПНБЙЮ АЮГШ ДЮММШУ
    $sql["tbl_config"] = "web_stg_config";  // РЮАКХЖЮ Я ЙНМЯРЮМРЮЛХ Х МЮЯРПНИЙЮЛХ
    
    // STG-Server Settings
    $stg_host	   = "127.0.0.1";		  // IP-ЮДПЕЯ ЯЕПБЕПЮ STG
    $stg_port	   = "5555";			   // оНПР ЯЕПБЕПЮ STG
    $stg_admin	  = "admin";			  // кНЦХМ ЮДЛХМХЯРПЮРНПЮ STG (ДКЪ ПЮГДЕКЮ "ОНКЭГНБЮРЕКХ")
    $stg_password   = "yyyyyyyy";		   // оЮПНКЭ ЮДЛХМХЯРПЮРНПЮ STG (ДКЪ ПЮГДЕКЮ "ОНКЭГНБЮРЕКХ")
    $stg_root_path  = "/usr/local/www/html/";	   // оНКМШИ ОСРЭ ДН ЙНПМЕБНИ ДХПЕЙРНПХХ ЯЮИРЮ
    $stg_KK_path	= "/usr/local/www/html/sgconf_xml";	 //оНКМШИ ОСРЭ ДН ЙНМЯНКЭМНЦН ЙНМТХЦСПЮРНПЮ, БЙКЧВЮЪ ЯЮЛ sgconf_xml
    
    // лЮЯЯХБ МЮГБЮМХИ ЛЕЯЪЖЕБ ЦНДЮ
    $monthy = array("", "января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря");
    $months = array("", "январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь");
    // ЛЮЯЯХБ ICQ ЮДЛХМХЯРПЮРНПНБ ЯХЯРЕЛШ (ПЮАНРЮЕР РНКЭЙН ОПХ МЮКХВХХ Iserverd)
    $admin_icq_array = array(10000,10001);

     

    Когда захожу на страницу админки, появляется окно авторизации, заполняю его, соглашаюсь, а потом вижу белый экран.

    Вот код:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META content="text/html; charset=windows-1251" http-equiv=Content-Type></HEAD>
    <BODY></BODY></HTML>

     

    sgconf_xml выдает следующее:

    Sgconf version: 1.05.9_STG-WEB
    
    Use: sgconf -s <server> -p <port> -a <admin> -w <admin_pass> -r <request_string>
    Use: sgconf -s <server> -p <port> -a <admin> -w <admin_pass> -f <request_file>
    
    Request file or string content:
    
     <GetServerInfo/>
    
     <GetTariffs/>
     <AddTariff name="NEW_TARIFF"/>
     <DelTariff name="DELETED_TARIFF"/>
    
     <SetTariff name="TARIFF"/>
    <Time[0...9] value="HH:MM-HH:MM"/>   Day-Night time for each DIR
    <PriceDayA value="PriceDayA0/PriceDayA1/PriceDayA2/PriceDayA3/PriceDayA4/PriceDayA5/PriceDayA6/PriceDayA7/PriceDayA8/PriceDayA9"/>
    <PriceDayB value="PriceDayB0/PriceDayB1/PriceDayB2/PriceDayB3/PriceDayB4/PriceDayB5/PriceDayB6/PriceDayB7/PriceDayB8/PriceDayB9"/>
    <PriceNightA value="PriceNightA0/PriceNightA1/PriceNightA2/PriceNightA3/PriceNightA4/PriceNightA5/PriceNightA6/PriceNightA7/PriceNightA8/PriceNightA9"/>
    <PriceNightB value="PriceNightB0/PriceNightB1/PriceNightB2/PriceNightB3/PriceNightB4/PriceNightB5/PriceNightB6/PriceNightB7/PriceNightB8/PriceNightB9"/>
    <SinglePrice value="SinglePrice0/SinglePrice1/SinglePrice2/SinglePrice3/SinglePrice4/SinglePrice5/SinglePrice6/SinglePrice7/SinglePrice8/SinglePrice9"/>
    <NoDiscount value="NoDiscount0/NoDiscount1/NoDiscount2/NoDiscount3/NoDiscount4/NoDiscount5/NoDiscount6/NoDiscount7/NoDiscount8/NoDiscount9"/>
    <Threshold value="NEW_Threshold"/>
    <Fee value="NEW_Fee"/>
    <PassiveCost value="NEW_PassiveCost"/>
    <Free value="NEW_Free"/>
    <TraffType value="NEW_TraffType"/>   New TraffType value: [up|down|up+down|max]
     </SetTariff/>
    
     <GetAdmins/>
     <AddAdmin login="LOGIN"/>
     <DelAdmin login="LOGIN"/>
     <ChgAdmin login="LOGIN" priv="NEW_PRIV" password="NEW_PASSWORD"/>

     

    Я бы проверил, как он работает, но что за параметр -r ? Что это за файл или строка?

    Что у меня неправильно, кв какую сторону копать?

  5. #ifndef SERVCONF_H
    #define SERVCONF_H
    
    #include "os_int.h"
    
    #include <expat.h>
    #include <list>
    #include <string>
    #include "netunit.h"
    #include "stg_const.h"
    
    void Start(void *data, const char *el, const char **attr);
    void End(void *data, const char *el);
    
    #define MAX_ERR_STR_LEN (64)
    #define IP_STRING_LEN   (255)
    //#define TARIFF_NAME_LEN (255)
    //#define IFACE_LEN       (255)
    //#define GROUP_LEN       (255)
    //#define NOTE_LEN        (255)
    //#define EMAIL_LEN       (255)
    
    #define UNAME_LEN       (256)
    #define SERV_VER_LEN    (64)
    #define DIRNAME_LEN     (16)
    
    //-----------------------------------------------------------------------------
    struct STAT
    {
       long long   su[DIR_NUM];
       long long   sd[DIR_NUM];
       long long   mu[DIR_NUM];
       long long   md[DIR_NUM];
       double      freeMb;
    };
    //-----------------------------------------------------------------------------
    struct SERVERINFO
    {
       char    version[sERV_VER_LEN];
       int     tariffNum;
       int     tariffType;
       int     usersNum;
       char    uname[uNAME_LEN];
       int     dirNum;
       char    dirName[DIR_NUM][DIRNAME_LEN];
    };
    //-----------------------------------------------------------------------------
    //-----------------------------------------------------------------------------
    struct USERDATA
    {
       char login[LOGIN_LEN];
       char password[PASSWD_LEN];
       double cash;
       double credit;
       int down;
       int passive;
       int connected;
       int alwaysOnline;
       uint32_t ip;
       char ips[iP_STRING_LEN];
       char tariff[TARIFF_NAME_LEN];
       char iface[iFACE_LEN];
       char group[GROUP_LEN];
       char note[NOTE_LEN];
       char email[email_LEN];
       STAT stat;
       struct USERDATA * next;
    };
    //-----------------------------------------------------------------------------
    typedef void(*RecvUserDataCb_t)(USERDATA * ud, void * data);
    typedef void(*RecvServerInfoDataCb_t)(SERVERINFO * si, void * data);
    typedef int(*RecvChgUserCb_t)(const char * asnwer, void * data);
    typedef int(*RecvCheckUserCb_t)(const char * answer, void * data);
    typedef int(*RecvSendMessageCb_t)(const char * answer, void * data);
    //-----------------------------------------------------------------------------
    struct ADMINDATA
    {
       char login[ADM_LOGIN_LEN];
    };
    //-----------------------------------------------------------------------------
    //-----------------------------------------------------------------------------
    class PARSER
    {
    public:
       PARSER();
       virtual ~PARSER(){};
       virtual int ParseStart(const char *el, const char **attr) = 0;
       virtual void ParseEnd(const char *el) = 0;
       void    Reset();
       //virtual bool    GetError() = 0;
       //virtual void    SetUserDataRecvCb(RecvUserDataCb_t) = 0;
    protected:
       //RecvUserDataCb_t RecvUserDataCb;
    private:
    };
    //-----------------------------------------------------------------------------
    class PARSER_CHG_USER: public PARSER
    {
    public:
       PARSER_CHG_USER();
       int  ParseStart(const char *el, const char **attr);
       void ParseEnd(const char *el);
       void Reset();
       void ParseAnswer(const char *el, const char **attr);
       void SetChgUserRecvCb(RecvChgUserCb_t, void * data);
    private:
       RecvChgUserCb_t RecvChgUserCb;
       void * chgUserCbData;
       int depth;
       bool error;
    };
    //-----------------------------------------------------------------------------
    class PARSER_CHECK_USER: public PARSER
    {
    public:
       PARSER_CHECK_USER();
       int  ParseStart(const char *el, const char **attr);
       void ParseEnd(const char *el);
       void Reset();
       void ParseAnswer(const char *el, const char **attr);
       void SetCheckUserRecvCb(RecvCheckUserCb_t, void * data);
    private:
       RecvCheckUserCb_t RecvCheckUserCb;
       void * checkUserCbData;
       int depth;
       bool error;
    };
    //-----------------------------------------------------------------------------
    //-----------------------------------------------------------------------------
    class PARSER_GET_USERS: public PARSER
    {
    public:
       PARSER_GET_USERS();
       int  ParseStart(const char *el, const char **attr);
       void ParseEnd(const char *el);
       void Reset();
       void ParseUsers(const char *el, const char **attr);
       void ParseUser(const char *el, const char **attr);
       void ParseUserParams(const char *el, const char **attr);
       void ParseUserLoadStat(const char * el, const char ** attr);
       //bool GetError();
       void SetUserDataRecvCb(RecvUserDataCb_t, void * data);
    private:
       RecvUserDataCb_t RecvUserDataCb;
       void * userDataCb;
       USERDATA user;
       int depth;
       bool error;
    };
    //-----------------------------------------------------------------------------
    class PARSER_GET_USER: public PARSER
    {
    public:
       PARSER_GET_USER();
       int  ParseStart(const char *el, const char **attr);
       void ParseEnd(const char *el);
       void Reset();
       void ParseUsers(const char *el, const char **attr);
       void ParseUser(const char *el, const char **attr);
       void ParseUserParams(const char *el, const char **attr);
       void ParseUserLoadStat(const char * el, const char ** attr);
       void SetUserDataRecvCb(RecvUserDataCb_t, void * data);
    private:
       RecvUserDataCb_t RecvUserDataCb;
       void * userDataCb;
       USERDATA user;
       int depth;
       bool error;
    };
    //-----------------------------------------------------------------------------
    //-----------------------------------------------------------------------------
    class PARSER_GET_SERVER_INFO: public PARSER
    {
    public:
       PARSER_GET_SERVER_INFO();
       int  ParseStart(const char *el, const char **attr);
       void ParseEnd(const char *el);
       void Reset();
       void ParseServerInfo(const char *el, const char **attr);
       bool GetError();
       void SetServerInfoRecvCb(RecvServerInfoDataCb_t, void * data);
    private:
       void ParseUname(const char ** attr);
       void ParseServerVersion(const char ** attr);
       void ParseUsersNum(const char ** attr);
       void ParseTariffsNum(const char ** attr);
       void ParseTariffType(const char ** attr);
       void ParseDirNum(const char **attr);
       void ParseDirName(const char **attr, int d);
    
       RecvServerInfoDataCb_t RecvServerInfoDataCb;
       void * serverInfoDataCb;
       USERDATA user;
       int depth;
       bool error;
       SERVERINFO serverInfo;
    };
    //-----------------------------------------------------------------------------
    class PARSER_SEND_MESSAGE: public PARSER
    {
    public:
       PARSER_SEND_MESSAGE();
       int  ParseStart(const char *el, const char **attr);
       void ParseEnd(const char *el);
       void Reset();
       void ParseAnswer(const char *el, const char **attr);
       void SetSendMessageRecvCb(RecvSendMessageCb_t, void * data);
    private:
       RecvSendMessageCb_t RecvSendMessageCb;
       void * sendMessageCbData;
       int depth;
       bool error;
    };
    //-----------------------------------------------------------------------------
    class SERVCONF
    {
    public:
       SERVCONF();
       void SetServer(const char * server);
       void SetPort(uint16_t port);
    
       void SetAdmLogin(const char * login);
       void SetAdmPassword(const char * password);
    
    void SetUserDataRecvCb(RecvUserDataCb_t, void * data);
       void SetServerInfoRecvCb(RecvServerInfoDataCb_t, void * data);
       void SetChgUserCb(RecvChgUserCb_t, void * data);
       void SetCheckUserCb(RecvCheckUserCb_t, void * data);
       void SetGetUserDataRecvCb(RecvUserDataCb_t, void * data);
       void SetSendMessageCb(RecvSendMessageCb_t, void * data);
    
       int GetUsers();
       int GetUser(const char * login);
       int ChgUser(const char * request);
       int SendMessage(const char * login, const char * message, int prio);
       int GetServerInfo();
       int CheckUser(const char * login, const char * password);
    
       char * GetStrError();
       int  GetError();
       int Start(const char *el, const char **attr);
       void End(const char *el);
    
    private:
       PARSER * currParser;
    
       PARSER_GET_USERS parserGetUsers;
       PARSER_GET_USER parserGetUser;
       PARSER_GET_SERVER_INFO  parserServerInfo;
       PARSER_CHG_USER parserChgUser;
       PARSER_CHECK_USER parserCheckUser;
       PARSER_SEND_MESSAGE parserSendMessage;
    
       NETTRANSACT nt;
       int parseDepth;
       USERDATA ud;
    
       char    errorMsg[MAX_ERR_STR_LEN];
       int     error;
       XML_Parser      parser;
    
       RecvUserDataCb_t RecvUserDataCb;
       RecvUserDataCb_t RecvGetUserDataCb;
       RecvServerInfoDataCb_t RecvServerInfoDataCb;
       RecvChgUserCb_t RecvChgUserCb;
       RecvCheckUserCb_t RecvCheckUserCb;
       RecvSendMessageCb_t RecvSendMessageCb;
    
       void * getUserDataDataCb;
       void * getUsersDataDataCb;
       void * getServerInfoDataCb;
       void * chgUserDataCb;
       void * checkUserDataCb;
       void * sendMessageDataCb;
       friend int AnsRecv(void * data, std::list<std::string> * list);
    };
    //-----------------------------------------------------------------------------
    
    #endif  /* _SERVCONF_H_ */
    
    /* EOF */
    

  6. locate expat.h
    /usr/include/expat.h
    /usr/local/include/expat.h
    /usr/local/include/python2.5/pyexpat.h
    /usr/src/contrib/expat/lib/expat.h

     

     

    gmake[2]: Entering directory `/home/yprozorov/stg-2.404.9.7/stglibs/srvconf.lib'
    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/stglibs/srvconf.lib'
    gmake[2]: Entering directory `/home/yprozorov/stg-2.404.9.7/stglibs/srvconf.lib'
    g++ -O2 -Wall -fPIC -I /home/yprozorov/stg-2.404.9.7/projects/sgconf/../../include -I ./ -DFREE_BSD5 -c netunit.cpp
    g++ -O2 -Wall -fPIC -I /home/yprozorov/stg-2.404.9.7/projects/sgconf/../../include -I ./ -DFREE_BSD5 -c parser.cpp
    In file included from parser.cpp:12:
    servconf.h:6:19: error: expat.h: No such file or directory
    In file included from parser.cpp:12:
    servconf.h:256: error: 'XML_Parser' does not name a type
    gmake[2]: *** [parser.o] Error 1
    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/stglibs/srvconf.lib'
    gmake[1]: *** [srvconf.lib] Error 2
    gmake[1]: Leaving directory `/home/yprozorov/stg-2.404.9.7/stglibs'
    gmake: *** [libs] Error 2
    

  7. Пытаюсь его собрать

     

    У меня уже FreeBSD 8, подправил build

    if [ "$sys" = "FreeBSD" ]
    then
       case $release in
           4) OS=bsd;;
           5) OS=bsd5;;
           6) OS=bsd5;;
           *) OS=bsd5;;
    

     

    Подправил Makefile

     

     

    ifeq ($(OS),bsd5)
    LIBS += -lexpat \
           -lpthread \
           -lc
    endif
    

     

    Запускаю build и в конце такая ошибка:

    gmake[2]: Entering directory `/home/yprozorov/stg-2.404.9.7/stglibs/srvconf.lib'
    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/stglibs/srvconf.lib'
    gmake[2]: Entering directory `/home/yprozorov/stg-2.404.9.7/stglibs/srvconf.lib'
    g++ -O2 -Wall -fPIC -I /home/yprozorov/stg-2.404.9.7/projects/sgconf/../../include -I ./ -DFREE_BSD5 -c netunit.cpp
    g++ -O2 -Wall -fPIC -I /home/yprozorov/stg-2.404.9.7/projects/sgconf/../../include -I ./ -DFREE_BSD5 -c parser.cpp
    In file included from parser.cpp:12:
    servconf.h:6:19: error: expat.h: No such file or directory
    In file included from parser.cpp:12:
    servconf.h:256: error: 'XML_Parser' does not name a type
    gmake[2]: *** [parser.o] Error 1
    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/stglibs/srvconf.lib'
    gmake[1]: *** [srvconf.lib] Error 2
    gmake[1]: Leaving directory `/home/yprozorov/stg-2.404.9.7/stglibs'
    gmake: *** [libs] Error 2
    

     

    locate expat.h
    /usr/local/include/expat.h
    /usr/local/include/python2.5/pyexpat.h
    /usr/src/contrib/expat/lib/expat.h

     

    Предложения????

  8. Имеется необходимость каждый месяц автоматически пополнять разрешенный размер трафика пользователям, так как вручную вбивать каждый раз 250 чисел не хочется.

     

    На FreeBSD 7.0 запущен Stargazer с модулем MySQL.

     

    Для этой цели решил задействовать поле Userdata0(+поменял его тип на double), куда должен записываться нужный месячный трафик. Соответственно, каждый месяц полю Cash присваивается значение из Userdata0 и все должно быть Ok.

     

    Решил скрипты сделать на перле (это мой первый опыт с перлом, поэтому не ругайтесь сильно :)=) )

    Скрипт OnUserAdd:

     

    #!/usr/bin/perl -w
    
    use DBI;
    #use struct;
    
    $dsn="DBI:mysql:stg_database:localhost"; # наименование источника данных
    $user_name="root"; # имя пользователя
    $password="xxxxxxxxx"; # пароль
    
    $LOGIN=@ARGV[0];
    
    # подключение к базе данных
    $dbh = DBI->connect ($dsn, $user_name, $password, { RaiseError => 0, PrintError => 0})or die "Невозможно подключиться к серверу: $DBI::err ($DBI: : е г г s t
    
    
    $sth = $dbh->prepare (qq{UPDATE users SET Userdata0=Cash WHERE login='$LOGIN'}) or bail_out("Невозможно создать запрос");
    
    $sth->execute();
    
    $sth->finish() or bail_out("Невозможно завершить выполнение запроса");
    $dbh->disconnect();
    
    exit(0);
    

     

    Приблизительно также работает OnChange.

     

    Начал проверять работу. Попробовал действовать в обратном направлении: присваивать значения из Userdata0 в Cash.

    В консоли mysql показывает, что значение меняется, а в конфигураторе ни чего не меняется, то же значение!!!!!

     

    Начал присваивать значения полю Cash из консоли:

    mysql> use stg_database;
    Database changed
    mysql> select cash from users where login='test';
    +------+
    | cash |
    +------+
    |   12 |
    +------+
    1 row in set (0.00 sec)
    
    mysql> update users set cash=23 where login='test';
    Query OK, 1 row affected (0.01 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    
    mysql> select cash from users where login='test';
    +------+
    | cash |
    +------+
    |   23 |
    +------+
    1 row in set (0.00 sec)
    
    mysql> flush table users;
    Query OK, 0 rows affected (0.01 sec)
    
    mysql> select cash from users where login='test';
    +------+
    | cash |
    +------+
    |   12 |
    +------+
    1 row in set (0.00 sec)
    

     

    Ситуация такая же. Вроде бы новое значение присваивается, но стоит выйти из консоли и зайти снова или запустить flash tables, прежнее значение возвращается. А в конфигураторе не меняется вообще ничего. Пробовал перезагружать Stargazer после замены значений, ничего не меняется..

    Захожу под рутом с GRANT ALL.

     

    То есть вручную поменять значения полей в базе я не могу, заблокированы что ли таблицы эти. Мои знания о MySQL невелики, поэтому не сочтите вопрос глупым, поскольку для меня он важен.

     

    В принципе, меня больше волнует вопрос автоматического добавления денег на счет, если кто знает, как это сделать, пишите, пожалуйста. Буду рад любым комментариям. :vah:

  9. Ладно, вернемся к нашим баранам.

    Буду пытаться работать с Firebird.

     

    Если люди работали, нельзя ли настройки Firebird сюда.

     

    В inetd.conf есть строчка:

    gds_db stream tcp nowait firebird /usr/local/bin/fb_inet_server fb_inet_server

    Вроде путь указан верно...

     

    В service тоже есть строчка про 3050 порт

    gds_db 3050/tcp #InterBase Database Remote Protocol

    gds_db 3050/udp #InterBase Database Remote Protocol

     

    В файле /usr/local/etc/firebird/firebird.conf что должно быть?????????

     

    Пробовал его редактировать

    # Specify the root directory under which Firebird is installed.

    # Can be used to override the OS-specifically determined one.

    #

    # Type: string

    #

    #RootDirectory = /var/db/firebird

    RootDirectory = /usr/local

     

    Как я понял, здесь надо указать директорию, куда установился firebird или что?

    Пробовал вариант по умолчанию (закомментирован) и /usr/local.

     

    DatabaseAccess = Full - тут вроде все понятно

     

    # ----------------------------

    # External File Paths/Directories

    #

    # ExternalFileAccess may be None, Full or Restrict. If you choose

    # Restrict, provide ';'-separated trees list, where external files

    # are stored. Relative paths are treated relative to RootDirectory entry

    # (see above). Default value 'None' disables any use of external files

    # on your site. To specify access to specific trees, enum all required

    # paths (for Win32 this may be something like 'C:\ExternalTables',

    # for unix - '/db/extern;/mnt/extern').

    #

    # NOTE: THE EXTERNAL TABLE ENGINE FEATURE COULD BE USED TO COMPROMISE

    # THE SERVER/HOST AS WELL AS DATABASE SECURITY!!

    #

    # IT IS STRONGLY RECOMMENDED THAT THIS SETTING BE USED TO LIMIT

    # EXTERNAL TABLE LOCATIONS!

    #

    # Type: string (special format)

    #

    ExternalFileAccess = Full - вот здесь не совсем понятно, что нужно писать.....

     

    # ----------------------------

    # External Function (UDF) Paths/Directories

    #

    # UdfAccess may be None, Full or Restrict. If you choose

    # Restrict, provide ';'-separated trees list, where UDF libraries

    # are stored. Relative paths are treated relative to RootDirectory entry

    # (see above). Default value 'Restrict UDF' provides the same restrictions

    # as in FB 1.0. To specify access to specific trees, enum all required

    # paths (for Win32 this may be something like 'C:\ExternalFunctions',

    # for unix - '/db/extern;/mnt/extern').

    #

    # NOTE: THE EXTERNAL FUNCTION ENGINE FEATURE COULD BE USED TO COMPROMISE

    # THE SERVER/HOST AS WELL AS DATABASE SECURITY!!

    #

    # IT IS STRONGLY RECOMMENDED THAT THIS SETTING BE USED TO LIMIT

    # EXTERNAL FUNCTION LOCATIONS!

    #

    # Type: string (special format)

    #

    UdfAccess = Restrict /usr/local/libexec/firebird/udf - тоже не совсем понятно

     

    # ----------------------------

    # Temporary directories

    #

    # Provide ';'-separated trees list, where temporary files are stored.

    # Relative paths are treated relative to RootDirectory entry

    # (see above). Default value is determined using FIREBIRD_TMP,

    # TEMP or TMP environment options. Every directory item may have optional

    # size argument to limit its storage, this argument follows the directory

    # name and must be separated by at least one space character. If the size

    # argument is omitted or invalid, then all available space in this

    # directory will be used.

    #

    # E.g.:

    # TempDirectories = c:\temp

    # or

    # TempDirectories = c:\temp;d:\temp

    # or

    # TempDirectories = c:\temp 100000000;d:\temp 500000000;e:\temp

    #

    # Type: string (special format)

    #

    TempDirectories = /tmp - надеюсь, эту опцию я понял :)

     

     

     

    Далее идут стандартные опции, все стоит по умолчанию.

    # Legacy hash makes possible use of old security.fdb

    # after running misc/upgrade/security_database.sql.

    # If you want to disable logons with old passwords

    # after users' migration, set it to 0 (false).

    # Makes no difference when used with original

    # security2.fdb - it can't contain DES hash.

    #

    # Type: boolean

    #

    LegacyHash = 1

     

    # ----------------------------

    # Number of cached database pages

    #

    # This sets the number of pages from any one database that can be held

    # in cache at once. If you increase this value, the engine will

    # allocate more pages to the cache for every database. By default, the

    # SuperServer allocates 2048 pages for each database and the classic

    # allocates 75 pages per client connection per database.

    #

    # Type: integer

    #

    DefaultDbCachePages = 2048

     

     

    # ----------------------------

    # In-memory sorting module

    #

    # The amount of memory allocated for each sort block.

    #

    # Type: integer

    #

    SortMemBlockSize = 1048576

     

    #

    # The maximum amount of memory to be allocated by the in-memory

    # sorting module.

    #

    # For Classic servers, this setting is defaulted to 8 MB.

    # Although it can be increased, the value applies to each client

    # connection/server instance and thus consumes a lot of memory.

    #

    # Type: integer

    #

    SortMemUpperLimit = 67108864

     

     

    # ----------------------------

    # Backward-compatible parameter ordering as it was in FB v1/IB

    #

    # Type: boolean

    #

    OldParameterOrdering = 0

    # Boolean evaluation method (complete or shortcut)

    #

    # If your SQL code depends on side-effects of full evaluation of OR

    # and AND statements (right-hand-side terms), even if the expressions

    # final result could be determined by just examining the value of the

    # first term, you might need to turn this on.

    #

    # Type: boolean

    #

    CompleteBooleanEvaluation = 0

     

     

    # ----------------------------

    #

    # Determines the number of seconds that the lock manager will wait after a

    # conflict has been encountered before purging locks from dead processes

    # and doing extra deadlock scan cycle. Engine detects deadlocks instantly

    # in all normal cases, so this value affects things only if something goes

    # wrong. Setting it too low may degrade system performance.

    #

    # Type: integer

    #

    DeadlockTimeout = 10

     

     

    # ----------------------------

    #

    # How often the pages are flushed on disk

    # (for databases with ForcedWrites=Off only)

    #

    # Number of unflushed writes which will accumulate before they are

    # flushed, at the next transaction commit. For non-Win32 ports,

    # the default value is -1 (Disabled)

    #

    # Type: integer

    #

    MaxUnflushedWrites = 100

     

    #

    # Number of seconds during which unflushed writes will accumulate

    # before they are flushed, at the next transaction commit. For non-Win32

    # ports, the default value is -1 (Disabled)

    #

    # Type: integer

    #

    MaxUnflushedWriteTime = 5

     

     

    # ----------------------------

    #

    # This option controls whether to call abort() when internal error or BUGCHECK

    # is encountered thus invoke post-mortem debugger which can dump core suitable

    # for off-line analysis. When disabled engine tries to minimize damage and

    # for off-line analysis. When disabled engine tries to minimize damage and

    # continue execution.

    #

    # Note that setting this option to 1 makes engine produce traceable coredumps

    # when something nasty like SIGSEGV happens inside UDF. On Windows enabling

    # this option makes engine invoke JIT debugger facilities when errors happen.

    #

    # For debugging builds (DEV_BUILD), default value is 1 (Enabled)

    #

    # Type: boolean

    #

    BugcheckAbort = 0

     

     

    # Prior to Firebird 1.5 various SELECT expressions generated unnamed

    # columns. This did not conform to the SQL standard. Fb 1.5 saw the

    # introduction of default aliases for these unnamed columns. In some

    # cases, particularly if string concatenation is used (via the ||

    # operator) this breaks existing scripts.

    #

    # This setting will affect aliases generated via CONCATENATION,

    # CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP and EXTRACT. Setting

    # the value to true will disable the alias generation. It is only

    # recommended to be used where legacy scripts need to be supported.

    # It will be marked deprecated in Firebird 2.0 and removed in

    # Firebird 3.0.

    #

    # Type: boolean

    #

    OldColumnNaming = 0

     

     

    # ----------------------------

    # Client Connection Settings (Basic)

    #

    # Seconds to wait before concluding an attempt to connect has failed.

    #

    # Type: integer

    #

    ConnectionTimeout = 180

     

    #

    # Seconds to wait on a silent client connection before the server sends

    # dummy packets to request acknowledgment.

    #

    # DO NOT USE THIS OPTION. It may hang or crash Windows on the client side as

    # explained here: http://support.microsoft.com/default.aspx?kbid=296265

    # or may not prevent eventual inactive client disconnection for other OS.

    #

    # Normally, Firebird uses SO_KEEPALIVE socket option to keep track of

    # active connections. If you do not like default 2-hour keepalive timeout

    # then adjust your server OS settings appropriately. On UNIX-like OS's,

    # modify contents of /proc/sys/net/ipv4/tcp_keepalive_*. On Windows,

    # follow instrutions of this article:

    # http://support.microsoft.com/default.aspx?kbid=140325

    #

    # Type: integer

    #

    DummyPacketInterval = 0

     

     

    # ----------------------------

    # TCP Protocol Settings

    #

    # The TCP Service name/Port number to be used for client database

    # connections.

    #

    # It is only necessary to change one of the entries, not both. The

    # order of precendence is the 'RemoteServiceName' (if an entry is

    # found in the 'services.' file) then the 'RemoteServicePort'.

    #

    # Type: string, integer

    #

    RemoteServiceName = gds_db

    RemoteServicePort = 3050

     

    #

    # The TCP Port Number to be used for server Event Notification

    # messages. The value of 0 (Zero) means that the server will choose

    # a port number randomly.

    #

    # Type: integer

    #

    RemoteAuxPort = 0

     

    #

    # TCP/IP buffer size for send and receive buffers of both the client

    # and server. The engine reads ahead of the client and can send

    # several rows of data in a single packet. The larger the packet size,

    # the more data is sent per transfer. Range is 1448 to 32767 (MAX_SSHORT).

    #

    # Type: integer

    #

    TcpRemoteBufferSize = 8192

     

    #

    # Either enables or disables Nagle algorithm (TCP_NODELAY option of

    # socket) of the socket connection.

    #

    # Note: Currently is a default for classic and super servers.

    #

    # Type: boolean

    #

    TcpNoNagle = 1

    # Allows incoming connections to be bound to the IP address of a

    # specific network card. It enables rejection of incoming connections

    # through any other network interface except this one. By default,

    # connections from any available network interface are allowed.

    #

    # Type: string

    #

    #RemoteBindAddress =

     

     

    # ----------------------------

    # Locking and shared memory parameters

    #

    # Bytes of shared memory allocated for lock manager.

    # In Classic mode, the size given is used for the initial allocation. The

    # table expands dynamically up to the limit of memory. In SuperServer, the

    # initial size is also the final size.

    # Default is 96K on Linux and Solaris, 256K on Windows.

    #

    # Type: integer

    #

    LockMemSize = 262144

     

    #

    # Number of semaphores for interprocess communication.

    # In non-threading environments, this sets the number of semaphores

    # available

    #

    # Type: integer

    #

    LockSemCount = 32

     

    #

    # When a connection wants to lock an object, it gets a lock request

    # block which specifies the object and the lock level requested. Each

    # locked object has a lock block. Request blocks are connected to those

    # lock blocks either as requests that have been granted, or as pending

    # requests.

    #

    # The settings:

    # 1 means locks are granted first come, first served.

    # 0 means emulate InterBase v3.3 behavior, where locks are granted

    # as soon as they are available; can result in lock request

    # starvation.

    #

    # Type: integer/boolean

    #

    LockGrantOrder = 1

     

    #

    # In Classic, only one client process may access the lock table at any

    # time. Access to the lock table is governed by a mutex. The mutex can

    # be requested conditionally - a wait is a failure and the request must

    # be retried - or unconditionally - the request will wait until it is

    # satisfied. This parameter establishes the number of attempts that

    # will be made conditionally. Zero value means unconditional mode.

    # Relevant only on SMP machines.

    #

    # Type: integer

    #

    LockAcquireSpins = 0

     

    #

    # Tune lock hash list; more hash slots mean shorter hash chains. Only

    # necessary under very high load. Prime number values are recommended.

    #

    # Type: integer

    #

    LockHashSlots = 101

     

    # ----------------------------

    #

    # Bytes of shared memory allocated for event manager.

    #

    # Type: integer

    #

    EventMemSize = 65536

     

     

    # ===========================

    # SuperServer Engine Settings

    # ===========================

    #

    # ----------------------------

    # Which CPUs should be used (Windows Only)

    #

    # In an SMP system, sets which processors can be used by the server.

    # The value is taken from a bit map in which each bit represents a CPU.

    # Thus, to use only the first processor, the value is 1. To use both

    # CPU 1 and CPU 2, the value is 3. To use CPU 2 and CPU 3, the value

    # is 6. The default value is 1.

    #

    # Type: integer

    #

    CpuAffinityMask = 1

     

     

    # ----------------------------

    # Settings for the thread scheduler (Windows Only)

    #

    # If you have problems with computer response time, running firebird

    # on workstation, turn off thread scheduler.

    #

    # Type: boolean

    #

    UsePriorityScheduler = 1

     

    #

    # The wait time, in milli-seconds (ms), before the priority of:

    # - an active thread is reduced to 'Low', or

    # - an inactive thread is increased to 'High'

    #

    # Note: The default value was chosen based on experiments on Intel

    # PIII/P4 processors. It should be increased for using in the computer

    # with lower speed processors.

    #

    # Type: integer

    #

    PrioritySwitchDelay = 100

     

    #

    # Number of additional 'intervals' given to a 'High' priority thread.

    #

    # Type: integer

    #

    PriorityBoost = 5

     

    # ----------------------------

    # Garbage collection policy

    #

    # Defines how engine does garbage collection. Valid values are :

    # cooperative

    # background

    # combined

    #

    # Superserver has by default "combined" policy

    # Classic has by default "cooperative" policy.

    # Other values are ignored by classic server build

    #

    # Type: string (special format)

    #

    GCPolicy = combined

     

     

    # ==============================

    # Classic Server Engine Settings

    # ==============================

    #

     

     

    # ==============================

    # Settings for Windows platforms

    # ==============================

    #

    # ----------------------------

    # Does the guardian restart the server every time it crashes?

    # 0 - only start the engine/service once

    # 1 - always restart the engine/service if it terminates

    #

     

    # Priority level/class for the server process.

    #

    # The values are:

    # 0 (Zero) - normal priority,

    # positive value - high priority (same as -B command line option)

    # negative value - low priority.

    #

    # Note: All changes to this value should be carefully tested to ensure

    # that engine is more responsive to requests.

    #

    # Type: integer

    #

    ProcessPriorityLevel = 0

     

     

    # ----------------------------

    # Local Connection Settings

    #

    # The name of the shared memory area used as a transport channel in local protocol.

    # Note that the local protocol in v2.0 is not compatible with any previous version

    # if Firebird or InterBase.

    #

    # IMPORTANT! If your host OS is Vista or you are running Windows 2003 or

    # Windows XP with terminal services enabled, and you need the local connection

    # to work, you should prefix the below value with "Global\", i.e. it should

    # be "Global\FIREBIRD". Please note that the prefix is case-sensitive.

    #

    # Type: string

    #

    IpcName = FIREBIRD

     

    #

    # The name of the pipe used as a transport channel in NetBEUI protocol.

    # Has the same meaning as a port number for TCP/IP. The default value is

    # compatible with IB/FB1.

    #

    # Type: string

    #

    RemotePipeName = interbas

     

    # ============================

    # Settings for Unix/Linux platforms

    # ============================

    #

    #

    # UNIX signal to use for interprocess communication

    #

    # Type: integer

    #

    LockSignal = 16

    # ----------------------------

    # Remove protection against opening databases on NFS mounted volumes

    #

    # ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING***

    #

    # This option removes an important safety feature of Firebird and can

    # cause irrecoverable database corruption. Do not use this option unless

    # you understand the risks and are prepared to accept the loss of the

    # contents of your database.

    # Unless this configuration option is changed from 0 to 1, Firebird can

    # open a database only if the database is stored on a drive physically

    # attached to the local computer - the computer running that copy of

    # Firebird. Requests for connections to databases stored on NFS mounted

    # drives are redirected to a Firebird server running on the computer that

    # "owns" the disk.

    # This restriction prevents two different copies of Firebird from opening

    # the same database without coordinating their activities. Uncoordinated

    # access by multiple copies of Firebird will corrupt a database. On a local

    # system, the system-level file locking prevents uncoordinated access to

    # the database file.

    # NFS does not provide a reliable way to detect multiple users of a file on

    # an NFS mounted disk. If a second copy of Firebird connects to a database on

    # an NFS mounted disk, it will corrupt the database.

    # Under some circumstances, running a Firebird server on the computer that

    # owns NFS mounted volumes is inconvenient or impossible. Applications that

    # use the "embedded" variant of Firebird and never share access to a database

    # can use this option to permit direct access to databases on NFS mounted

    # volumes.

    # DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

    #

    # Type: boolean

    #

    RemoteFileOpenAbility = 0

    # ----------------------------

    # Remove protection against redirecting requests to other servers

    #

    # ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING***

    #

    # Ability to redirect requests to other servers was initially present

    # in Interbase, but was broken by Borland in Interbase 6.0, when

    # they added SQL dialects. Request redirection was fixed in firebird 2.0,

    # but today such behaviour (proxy) seems to be dangerous from security

    # point of view. Imagine, you have one carefully protected firebird server,

    # access to which is possible from global net. But in case when this server

    # has access to your internal LAN (may and should be restricted,

    # but often possible), it will work as a gateway for incoming requests like:

    # firebird.your.domain.com:internal_server:/private/database.fdb

    # It's enough to know name/IP of some internal server on your LAN, and for

    # this connection one even need not know login/password on external server.

    # Such gateway easily overrides firewall, installed to protect your LAN

    # from outside attack.

    #

    # DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.

    #

    # Type: boolean

    #

    Redirection = 0

     

    #######################################

    #

    # KB to Bytes Conversion table

    #

    #######################################

    #

    # KB Bytes KB Bytes

    # ---- --------- ---- ---------

    # 1 1024 32 32768

    # 2 2048 64 65536

    # 4 4096 128 131072

    # 8 8192 256 262144

    # 16 16384 512 524288

    #

    #######################################

    #

    # MB to Bytes Conversion table

    #

    #######################################

    #

    # MB Bytes MB Bytes MB Bytes

    # --- --------- --- ----------- --- -----------

    # 1 1048576 64 67108864 448 469762048

    # 2 2097152 128 134217728 512 536870912

    # 4 4194304 192 201326592 640 671088640

    # 8 8388608 256 268435456 768 805306368

    # 16 16777216 320 335544320 896 939524096

    # 32 33554432 384 402653184 1024 1073741824

     

     

    При установке Stargazera ошибка:

     

    ...

    cat ./inst/var/stargazer/../00-base-00.sql >> .db.sql

    /usr/local/bin/isql -i .db.sql

    Use CONNECT or CREATE DATABASE to specify a database

    Statement failed, SQLCODE = -902

    cannot attach to password database

    After line 0 in file .db.sql

    Statement failed, SQLCODE = -902

    cannot attach to password database

    After line 2 in file .db.sql

    Statement failed, SQLCODE = -902

    cannot attach to password database

    After line 3 in file .db.sql

    Statement failed, SQLCODE = -902

    cannot attach to password database

    After line 56 in file .db.sql

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

    Use CONNECT or CREATE DATABASE to specify a database

     

    Подскажите, что у меня неправильно

     

    :bue:

  10. Вроде слушает

    firebird fb_inet_se 68430 0 tcp4 127.0.0.1:* 127.0.0.1:61565

    firebird fb_inet_se 68430 1 tcp4 127.0.0.1:* 127.0.0.1:61565

    firebird fb_inet_se 68430 2 tcp4 127.0.0.1:* 127.0.0.1:61565

    firebird fb_inet_se 68232 0 tcp4 127.0.0.1:* 127.0.0.1:57568

    firebird fb_inet_se 68232 1 tcp4 127.0.0.1:* 127.0.0.1:57568

    firebird fb_inet_se 68232 2 tcp4 127.0.0.1:* 127.0.0.1:57568

    firebird fb_inet_se 68110 0 tcp4 127.0.0.1:* 127.0.0.1:65181

    firebird fb_inet_se 68110 1 tcp4 127.0.0.1:* 127.0.0.1:65181

    firebird fb_inet_se 68110 2 tcp4 127.0.0.1:* 127.0.0.1:65181

    firebird fb_inet_se 66746 0 tcp4 127.0.0.1:* 127.0.0.1:61703

    firebird fb_inet_se 66746 1 tcp4 127.0.0.1:* 127.0.0.1:61703

    firebird fb_inet_se 66746 2 tcp4 127.0.0.1:* 127.0.0.1:61703

    firebird fb_inet_se 66718 0 tcp4 127.0.0.1:* 127.0.0.1:56715

    firebird fb_inet_se 66718 1 tcp4 127.0.0.1:* 127.0.0.1:56715

    firebird fb_inet_se 66718 2 tcp4 127.0.0.1:* 127.0.0.1:56715

     

    В общем, я так понял, что ставить под FreeBSD Firebird - гиблое дело

     

    Тогда вопрос про MySQL

     

    В файле Makefile нет строчек про Mysql:

    install-bin:

    mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/sbin

    install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)

    $(MAKE) -C $(DIR_LIBSRC) install

    $(MAKE) -C $(DIR_PLUGINS) install

     

    install-data:

    # Install etc

    mkdir -m $(DATA_MODE) -p $(PREFIX)/etc/stargazer

    install -m $(DATA_MODE) -o $(OWNER) $(ETC_DIR)/stargazer.conf $(PREFIX)/etc/stargazer/stargazer.conf

    install -m $(DATA_MODE) -o $(OWNER) $(ETC_DIR)/rules $(PREFIX)/etc/stargazer/rules

    install -m $(BIN_MODE) -o $(OWNER) $(ETC_DIR)/On* $(PREFIX)/etc/stargazer/

     

    # Install file db

    mkdir -m $(DATA_MODE) -p $(PREFIX)/var/stargazer/admins

    mkdir -m $(DATA_MODE) -p $(PREFIX)/var/stargazer/tariffs

    mkdir -m $(DATA_MODE) -p $(PREFIX)/var/stargazer/users/test

    install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/admins/admin.adm $(PREFIX)/var/stargazer/admins/admin.adm

    install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/tariffs/tariff.tf $(PREFIX)/var/stargazer/tariffs/tariff.tf

    install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/users/test/conf $(PREFIX)/var/stargazer/users/test/conf

    install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/users/test/stat $(PREFIX)/var/stargazer/users/test/stat

     

    ifeq ($(CHECK_FBCLIENT),yes)

    # Install firebird db

    mkdir -p $(PREFIX)/var/stargazer

    chown $(OWNER):$(FIREBIRD_GROUP) $(PREFIX)/var/stargazer

    chmod g+rw $(PREFIX)/var/stargazer

    echo "connect '$(DB_ADDRESS)' user '$(DB_USER)' password '$(DB_PASSWORD)';" > .db.sql

    echo "drop database;" >> .db.sql

    echo "create database '$(DB_ADDRESS)' user '$(DB_USER)' password '$(DB_PASSWORD)' default character set win1251;" >> .db.sql

    cat $(VAR_DIR)/../00-base-00.sql >> .db.sql

    $(FIREBIRD_ISQL) -i .db.sql

    rm -f .db.sql

    endif

     

    uninstall: uninstall-bin uninstall-data

     

    То есть, как я понимаю, для работы с Mysql, сначала нужно создать базу, а потом выполнить в ней запрос, который в папке inst находиться,правильно?

  11. Люди, помогите!!!

     

    Расскажите, как правильно установить и настроить firebird под FreeBSD.

     

    Ставлю Stg на FreeBSD 7, удаленно. Хочу использовать firebird.

    Делаю в соответствии с советами на форуме.

    ./build прошел нормально

    Делаю gmake install

    В конце такой вывод:

     

    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/capture/divert_freebsd'

    gmake install -C store/firebird

    gmake[2]: Entering directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/store/firebird'

    mkdir -m 0755 -p /usr/lib/stg

    install -m 0755 -o firebird -s mod_store_firebird.so /usr/lib/stg/mod_store_firebird.so

    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/store/firebird'

    gmake install -C store/mysql

    gmake[2]: Entering directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/store/mysql'

    mkdir -m 0755 -p /usr/lib/stg

    install -m 0755 -o firebird -s mod_store_mysql.so /usr/lib/stg/mod_store_mysql.so

    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/store/mysql'

    gmake[1]: Leaving directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins'

    # Install etc

    mkdir -m 0644 -p /etc/stargazer

    install -m 0644 -o firebird ./inst/freebsd/etc/stargazer/stargazer.conf /etc/stargazer/stargazer.conf

    install -m 0644 -o firebird ./inst/freebsd/etc/stargazer/rules /etc/stargazer/rules

    install -m 0755 -o firebird ./inst/freebsd/etc/stargazer/On* /etc/stargazer/

    # Install file db

    # Install firebird db

    mkdir -p /var/stargazer

    chown firebird:firebird /var/stargazer

    chmod g+rw /var/stargazer

    echo "connect 'localhost:/var/stargazer/stargazer.fdb' user 'stg' password 'nehtwrbq';" > .db.sql

    echo "drop database;" >> .db.sql

    echo "create database 'localhost:/var/stargazer/stargazer.fdb' user 'stg' password 'nehtwrbq' default character set win1251;" >> .db.sql

    cat ./inst/var/stargazer/../00-base-00.sql >> .db.sql

    /usr/local/bin/isql -i .db.sql

    Use CONNECT or CREATE DATABASE to specify a database

     

    И намертво замирает все.....

     

    Firebird вроде стоит...

    firebird-client-2.0.3_2 Firebird-2 database client

    firebird-server-2.0.3_2 Firebird-2 relational database (server)

     

    ISQL указана верно:

    locate isql|more

    /usr/local/bin/isql

    /usr/local/share/doc/firebird/README.isql_enhancements.txt

    /usr/ports/databases/isql-viewer

    /usr/ports/databases/isql-viewer/Makefile

    /usr/ports/databases/isql-viewer/distinfo

    /usr/ports/databases/isql-viewer/files

    /usr/ports/databases/isql-viewer/files/iSQL-Viewer.sh

    /usr/ports/databases/isql-viewer/pkg-descr

    /usr/ports/databases/isql-viewer/pkg-message

     

    top показывает:

    PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND

    12025 root 1 44 0 5000K 2572K select 1 0:08 0.00% ppp

    12030 root 1 44 0 3172K 1112K select 0 0:07 0.00% pptp

    2763 root 1 44 0 9004K 6584K select 1 0:01 0.00% httpd

    2676 yprozorov 1 44 0 8796K 4148K select 3 0:01 0.00% sshd

    55194 root 1 44 0 6276K 3208K select 0 0:01 0.00% mc

    27678 yprozorov 1 44 0 8796K 4156K select 1 0:00 0.00% sshd

    1879 root 1 44 0 3172K 1172K select 3 0:00 0.00% syslogd

    1142 _pflogd 1 -58 0 3332K 1324K bpf 0 0:00 0.00% pflogd

    27689 root 1 8 0 3388K 1680K wait 0 0:00 0.00% deco

    2061 root 1 8 0 3120K 832K nanslp 3 0:00 0.00% svscan

    55202 root 1 5 0 5492K 2488K ttyin 1 0:00 0.00% csh

    68243 yprozorov 1 44 0 8796K 4120K select 0 0:00 0.00% sshd

    2667 root 1 4 0 8796K 4132K sbwait 2 0:00 0.00% sshd

    27671 root 1 4 0 8796K 4140K sbwait 1 0:00 0.00% sshd

    2072 dnscache 1 44 0 4144K 2100K select 1 0:00 0.00% dnscache

    68240 root 1 4 0 8796K 4140K sbwait 0 0:00 0.00% sshd

    68254 root 1 8 0 3388K 1604K wait 1 0:00 0.00% deco

    1818 root 1 96 0 1888K 548K select 0 0:00 0.00% devd

    68440 root 1 44 0 3504K 1804K CPU2 2 0:00 0.00% top

    2071 dnslog 1 -8 0 3120K 788K piperd 2 0:00 0.00% multilog

    2231 root 1 8 0 3200K 1224K nanslp 1 0:00 0.00% cron

    68232 firebird 1 -4 0 22480K 5872K semwai 0 0:00 0.00% fb_inet_server

    66718 firebird 1 -4 0 22480K 5872K semwai 0 0:00 0.00% fb_inet_server

    66310 www 1 4 0 10796K 7684K accept 4 0:00 0.00% httpd

    68429 root 1 96 0 21388K 5736K select 0 0:00 0.00% isql

    66746 firebird 1 -4 0 22480K 5872K semwai 1 0:00 0.00% fb_inet_server

    68110 firebird 1 -4 0 22480K 5872K semwai 1 0:00 0.00% fb_inet_server

    68430 firebird 1 -4 0 22480K 5872K semwai 1 0:00 0.00% fb_inet_server

     

    То есть вроде все работает.

     

    Пробовал файлик sql как запрос выполнить, тоже самое.

    Пробовал юзера менять на root, пробовал подключаться через sysdbа, все равно..

     

     

     

    Может стоит перейти на mysql? Так в скрипте нет установки базы на mysql

  12. Люди, помогите!!!

     

    Ставлю Stg на FreeBSD 7, удаленно. Хочу использовать firebird.

    Делаю в соответствии с советами на форуме.

    ./build прошел нормально

    Делаю gmake install

    В конце такой вывод:

     

    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/capture/divert_freebsd'

    gmake install -C store/firebird

    gmake[2]: Entering directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/store/firebird'

    mkdir -m 0755 -p /usr/lib/stg

    install -m 0755 -o firebird -s mod_store_firebird.so /usr/lib/stg/mod_store_firebird.so

    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/store/firebird'

    gmake install -C store/mysql

    gmake[2]: Entering directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/store/mysql'

    mkdir -m 0755 -p /usr/lib/stg

    install -m 0755 -o firebird -s mod_store_mysql.so /usr/lib/stg/mod_store_mysql.so

    gmake[2]: Leaving directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins/store/mysql'

    gmake[1]: Leaving directory `/home/yprozorov/stg-2.404.9.7/projects/stargazer/plugins'

    # Install etc

    mkdir -m 0644 -p /etc/stargazer

    install -m 0644 -o firebird ./inst/freebsd/etc/stargazer/stargazer.conf /etc/stargazer/stargazer.conf

    install -m 0644 -o firebird ./inst/freebsd/etc/stargazer/rules /etc/stargazer/rules

    install -m 0755 -o firebird ./inst/freebsd/etc/stargazer/On* /etc/stargazer/

    # Install file db

    # Install firebird db

    mkdir -p /var/stargazer

    chown firebird:firebird /var/stargazer

    chmod g+rw /var/stargazer

    echo "connect 'localhost:/var/stargazer/stargazer.fdb' user 'stg' password 'nehtwrbq';" > .db.sql

    echo "drop database;" >> .db.sql

    echo "create database 'localhost:/var/stargazer/stargazer.fdb' user 'stg' password 'nehtwrbq' default character set win1251;" >> .db.sql

    cat ./inst/var/stargazer/../00-base-00.sql >> .db.sql

    /usr/local/bin/isql -i .db.sql

    Use CONNECT or CREATE DATABASE to specify a database

     

    И намертво замирает все.....

     

    Firebird вроде стоит...

    firebird-client-2.0.3_2 Firebird-2 database client

    firebird-server-2.0.3_2 Firebird-2 relational database (server)

     

    ISQL указана верно:

    locate isql|more

    /usr/local/bin/isql

    /usr/local/share/doc/firebird/README.isql_enhancements.txt

    /usr/ports/databases/isql-viewer

    /usr/ports/databases/isql-viewer/Makefile

    /usr/ports/databases/isql-viewer/distinfo

    /usr/ports/databases/isql-viewer/files

    /usr/ports/databases/isql-viewer/files/iSQL-Viewer.sh

    /usr/ports/databases/isql-viewer/pkg-descr

    /usr/ports/databases/isql-viewer/pkg-message

     

    top показывает:

    PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND

    12025 root 1 44 0 5000K 2572K select 1 0:08 0.00% ppp

    12030 root 1 44 0 3172K 1112K select 0 0:07 0.00% pptp

    2763 root 1 44 0 9004K 6584K select 1 0:01 0.00% httpd

    2676 yprozorov 1 44 0 8796K 4148K select 3 0:01 0.00% sshd

    55194 root 1 44 0 6276K 3208K select 0 0:01 0.00% mc

    27678 yprozorov 1 44 0 8796K 4156K select 1 0:00 0.00% sshd

    1879 root 1 44 0 3172K 1172K select 3 0:00 0.00% syslogd

    1142 _pflogd 1 -58 0 3332K 1324K bpf 0 0:00 0.00% pflogd

    27689 root 1 8 0 3388K 1680K wait 0 0:00 0.00% deco

    2061 root 1 8 0 3120K 832K nanslp 3 0:00 0.00% svscan

    55202 root 1 5 0 5492K 2488K ttyin 1 0:00 0.00% csh

    68243 yprozorov 1 44 0 8796K 4120K select 0 0:00 0.00% sshd

    2667 root 1 4 0 8796K 4132K sbwait 2 0:00 0.00% sshd

    27671 root 1 4 0 8796K 4140K sbwait 1 0:00 0.00% sshd

    2072 dnscache 1 44 0 4144K 2100K select 1 0:00 0.00% dnscache

    68240 root 1 4 0 8796K 4140K sbwait 0 0:00 0.00% sshd

    68254 root 1 8 0 3388K 1604K wait 1 0:00 0.00% deco

    1818 root 1 96 0 1888K 548K select 0 0:00 0.00% devd

    68440 root 1 44 0 3504K 1804K CPU2 2 0:00 0.00% top

    2071 dnslog 1 -8 0 3120K 788K piperd 2 0:00 0.00% multilog

    2231 root 1 8 0 3200K 1224K nanslp 1 0:00 0.00% cron

    68232 firebird 1 -4 0 22480K 5872K semwai 0 0:00 0.00% fb_inet_server

    66718 firebird 1 -4 0 22480K 5872K semwai 0 0:00 0.00% fb_inet_server

    66310 www 1 4 0 10796K 7684K accept 4 0:00 0.00% httpd

    68429 root 1 96 0 21388K 5736K select 0 0:00 0.00% isql

    66746 firebird 1 -4 0 22480K 5872K semwai 1 0:00 0.00% fb_inet_server

    68110 firebird 1 -4 0 22480K 5872K semwai 1 0:00 0.00% fb_inet_server

    68430 firebird 1 -4 0 22480K 5872K semwai 1 0:00 0.00% fb_inet_server

     

    То есть вроде все работает.

     

    Пробовал файлик sql как запрос выполнить, тоже самое.

    Пробовал юзера менять на root, пробовал подключаться через sysdbа, все равно..

     

    Может стоит перейти на mysql? Так в скрипте нет установки базы на mysql

×
×
  • Створити нове...