Dateformat unknown system variable and mssql- how to fix it?

Moderator: crythias

Locked
andreaconsadori
Znuny newbie
Posts: 19
Joined: 11 May 2010, 14:37
Znuny Version: 2.4.7

Dateformat unknown system variable and mssql- how to fix it?

Post by andreaconsadori »

Hi, i have sometimes Error 500 while playing with otrs,
i see apache error.log while using otrs and when i've 500 error i can see this log

Code: Select all

[Tue Nov 27 09:00:01 2012] -e: DBD::mysql::db do failed: Unknown system variable 'DATEFORMAT' at /opt/otrs//Kernel/System/DB.pm line 478.
ERROR: OTRS-CGI-20 Perl: 5.10.1 OS: linux Time: Tue Nov 27 09:00:01 2012

 Message: Unknown system variable 'DATEFORMAT', SQL: 'SET DATEFORMAT ymd'

 Traceback (2137):
   Module: Kernel::System::DB::Connect (v1.144.2.2) Line: 272
   Module: Kernel::System::DB::new (v1.144.2.2) Line: 227
   Module: Kernel::System::Web::InterfaceAgent::Run (v1.64) Line: 143
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 46
   Module: (eval) (v1.90) Line: 204
   Module: ModPerl::RegistryCooker::run (v1.90) Line: 204
   Module: ModPerl::RegistryCooker::default_handler (v1.90) Line: 170
   Module: ModPerl::Registry::handler (v1.99) Line: 31
any info?

this start asap i connect external db with this conf.

Code: Select all

# CustomerUser (customer database backend and settings)
$Self->{CustomerUser} = {
    Name => 'Server NAVISION',
    Module => 'Kernel::System::CustomerUser::DB',
    Params => {
#        # if you want to use an external database, add the required settings
            DSN => 'DBI:ODBC:TS',
            User => 'Reader',
            Password => 'reader',
            Table => 'MY$Customer',
            SourceCharset => 'iso-8859-15',
            DestCharset => 'iso-8859-15',

            # CaseSensitive will control if the SQL statements need LOWER()
            #   function calls to work case insensitively. Setting this to
            #   1 will improve performance dramatically on large databases.
            CaseSensitive => 0,
        },
# customer unique id
CustomerKey => 'No_',

# customer #
CustomerID => 'No_',
#CustomerValid => 'valid_id',
    CustomerUserListFields => ['Name', 'Address','No_','City'],
    CustomerUserSearchFields => ['Name', 'Address','No_'],
#    CustomerUserSearchPrefix => '',
#    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 20,
   # CustomerUserPostMasterSearchFields => ['email'],
    CustomerUserNameFields => ['Name'],
#    CustomerUserEmailUniqCheck => 0,
#    # show not own tickets in customer panel, CompanyTickets
#    CustomerUserExcludePrimaryCustomerID => 0,
#    # generate auto logins
#    AutoLoginCreation => 0,
#    AutoLoginCreationPrefix => 'auto',
#    # admin can change customer preferences
#    AdminSetPreferences => 1,
#    # cache time to live in sec. - cache any database queries
#    CacheTTL => 0,
#    # just a read only source
    ReadOnly => 1,
    Map => [
        # note: Login, Email and CustomerID needed!
        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
#       [ 'UserTitle',      'Title',      'title',      1, 0, 'var', '', 0 ],
        [ 'UserFirstname',  'Firstname',  'name',       1, 1, 'var', '', 0 ],
#        [ 'UserLastname',   'Lastname',   'last_name',  0, 1, 'var', '', 0 ],
        [ 'UserLogin',      'Username',   'No_',        1, 1, 'var', '', 0 ],
#        [ 'UserPassword',   'Password',   'pw',         0, 0, 'var', '', 0 ],
#      [ 'UserEmail',      'Email',      'Mail',      1, 1, 'var', '', 0 ],

#        [ 'UserEmail',      'Email', 'email',           1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ],
        [ 'UserCustomerID', 'CustomerID', 'No_', 0, 1, 'var', '', 0 ],

#        [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
        [ 'UserPhone',        'Phone',       'Contact Phone',        1, 0, 'var', '', 0 ],
#        [ 'UserFax',          'Fax',         'Fax No_',          1, 0, 'var', '', 0 ],
#        [ 'UserMobile',       'Mobile',      'mobile',       0, 0, 'var', '', 0 ],
        [ 'UserStreet',       'Street',      'Address',       1, 0, 'var', '', 0 ],
#        [ 'UserZip',          'Zip',         'Post',          1, 0, 'var', '', 0 ],
        [ 'UserCity',         'City',        'City',         1, 0, 'var', '', 0 ],
#        [ 'UserCountry',      'Country',     'country',      0, 0, 'var', '', 0 ],
#       [ 'UserComment',      'Comment',     'comments',     0, 0, 'var', '', 0 ],
#        [ 'ValidID',          'Valid',       'valid_id',     0, 0, 'int', '', 0 ],
    ],
    # default selections
#    Selections => {
#        UserTitle => {
#            'Mr.' => 'Mr.',
#            'Mrs.' => 'Mrs.',
#        },
#    },
};

$Self->{"Database::Type"} = 'mssql'
what's very strange is that if i click on users 3 times, the fist 2 i've no issue, at the third i've the apache 500 error, this issue is random clicking on otrs web interface.

i see this error when i've the 500 error code

Code: Select all

[Tue Nov 27 12:06:52 2012] [error] Undefined subroutine &Kernel::Config::Load called at /opt/otrs//Kernel/Config/Defaults.pm line 1770.\n

Centos 6
32bit
otrs-3.1.11-01.noarch
Locked