Phplogcon and CP1251 charset

You need additional help with phplogcon, then write into this forum.

Phplogcon and CP1251 charset

Postby NikitaDanil » Wed Mar 10, 2010 8:29 am

Dear Collegues!

I have 10 computers with russian Windows XP and get Windows logs by Snare program. Charset of these logs are "cp1251" or "windows-1251" (russian Windows). These logs are collected by rsyslog version 4.3 on self-made Cent OS 5.4 Log Server and write to MySQL v5.1 database. In MySQL, all need charsets are cp1251, and query with "SELECT" from command line show normal Russian characters :D . In WebMin web-interface, I can also see normal Russian characters :) .

But in phplogcon, instead russian characters... I see incorrect awful characters. :oops:

Image

How can I see correct Russian (cp1251) characters in phplogcon? I think that I have some trouble in options of connect PhpLogCon with MySQL database, but I couldn't find a file which contains options of connect Phplogcon with MySQL.

P.S. In httdp.conf and php.ini, I have already set charset cp1251...

Sincerely yours,
Nikita
NikitaDanil
New
 
Posts: 2
Joined: Wed Mar 10, 2010 8:12 am

phpLogCon professional services

  • Custom phpLogCon configuration?
  • Maintenance Contract?
  • Installation support?

Re: Phplogcon and CP1251 charset

Postby alorbach » Wed Mar 10, 2010 4:39 pm

Hi,

hrm if the messages are saved with unicode encoding, this would not be supported yet.

You can try to change the html header of the main header template, edit src/templates/include_header.html
Search for this:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
[code]

After this, add this code:
[/code]
<META http-equiv="Content-Type" content="text/html; charset=CP1251">


So it looks like:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
            <META http-equiv="Content-Type" content="text/html; charset=CP1251">
   <title>{TITLE}</title>
...


This may could work, but I haven't tested this.

best regards,
Andre Lorbach
User avatar
alorbach
Site Admin
 
Posts: 1180
Joined: Thu Feb 13, 2003 11:55 am

Re: Phplogcon and CP1251 charset

Postby NikitaDanil » Thu Mar 11, 2010 4:02 am

Excuse me, what is "hrm"? My message save in cp1251 encoding (encoding of Windows XP RUS Event Logs).

I have already done aforementioned changing of html header, but it do not work. I want to find a place (in phplogcon files) where phplogcon connects with MySQL and may be touch cp1251 charset before data query. But where phplogcon connects with MySQL? I can't find this place in files... For exapmple, functions_db.php - it is not that.

Is there detailed English description of all phplogcon files and their content (objects, variables, etc)?

May be, I have to code my cp1251 messages into utf8?
NikitaDanil
New
 
Posts: 2
Joined: Wed Mar 10, 2010 8:12 am

Re: Phplogcon and CP1251 charset

Postby alorbach » Thu Mar 11, 2010 3:45 pm

"hrm" doesnt mean anything ;).

Alle php code files are document inside only.
However the files which connect to the mysql database are the logstream classes which can be found in src/classes/ and called "logstreamdb.class.php" or "logstreampdo.class.php".

best regards,
Andre Lorbach
User avatar
alorbach
Site Admin
 
Posts: 1180
Joined: Thu Feb 13, 2003 11:55 am

Google Ads



Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest