Ticket #836 (closed defect: fixed)

Opened 10 months ago

Last modified 5 months ago

Static awstats in user's language

Reported by: Cube Assigned to:
Priority: minor Milestone: ispCP ω 1.0.0 - RC5
Component: Backend (Engine) Version: ispCP ω 1.0.0 - RC2
Severity: Medium Keywords: awstats
Cc:

Description

The cronjob for static awstats contains the -lang=en option. This should be set to the language the user has chosen in ispcp.

Forum thread about this and other topics

Attachments

Change History

02/17/08 14:50:44 changed by rats

  • severity set to Hard.
  • milestone changed from ispCP ω 1.1.0 to Working.

02/25/08 09:06:59 changed by rats

  • milestone changed from Working to ispCP ω 1.0.0.

03/17/08 18:20:18 changed by rats

  • severity changed from Hard to Medium.
  • milestone changed from ispCP ω 1.0.0 to ispCP ω 1.0.0 - RC5.

03/23/08 16:10:11 changed by rats

  • status changed from new to closed.
  • resolution set to fixed.

added in r1074 - Please test it and give feeback to me, I've no time to test it.

03/24/08 23:11:16 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

It does not work. Here is ispcp-dmn-mngr.stderr:

Scalar found where operator expected at /var/www/ispcp/engine/ispcp-dmn-mngr line 4173, near ""$awstats_e"
  (Might be a runaway multi-line "" string starting on line 4097)
Global symbol "$rdata" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4051.
Global symbol "$key" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$languages" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$key" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "@rdata" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$languages" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$key" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_b" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_entry" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_e" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_b" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_entry" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_e" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_b" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_entry" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$dmn_awstats_e" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$sys" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$working" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$rdata" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$working" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$rdata" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$working" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
Global symbol "$working" requires explicit package name at /var/www/ispcp/engine/ispcp-dmn-mngr line 4097.
/var/www/ispcp/engine/ispcp-dmn-mngr has too many errors.

03/25/08 00:55:54 changed by rats

  • status changed from reopened to closed.
  • resolution set to fixed.

supid mistake; just an " missing in line 4097

03/25/08 12:28:03 changed by Cube

  • status changed from closed to reopened.
  • resolution deleted.

It still does not work. Here are the first 3 lines from ispcp-dmn-mngr.stderr:

Argument "lang_Estonian" isn't numeric in numeric eq (==) at /var/www/ispcp/engine/ispcp-dmn-mngr line 4101.
Argument "lang_PortuguesBrazil" isn't numeric in numeric eq (==) at /var/www/ispcp/engine/ispcp-dmn-mngr line 4101.
Argument "lang_Russian" isn't numeric in numeric eq (==) at /var/www/ispcp/engine/ispcp-dmn-mngr line 4101.

I replaced == with eq, after that there are no more errors, but the lang remains en although in the db it is set to lang_GermanGermany.

03/25/08 14:12:09 changed by rats

  • status changed from reopened to closed.
  • resolution set to fixed.

maybe "eq" will help! r1080

03/26/08 00:13:48 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

As I already said it does not work!
I finally solved the problem by adding the following before line 4100:

$rdata=@$rdata[0];

(follow-up: ↓ 11 ) 03/26/08 10:52:24 changed by rats

  • status changed from reopened to closed.
  • resolution set to fixed.

sorry Cube I've not read the complete comment. I've added your submission, however this is working?

can you please show me you're ispCP-Crontab for AWStats. I cannot believe it, because $rdata=@$rdata[0]; does nothing. $rdata is not used any more. Or should I replace @$rdata[0] by $rdata in

if ($key eq @$rdata[0]) {

too?

(in reply to: ↑ 10 ) 03/26/08 15:49:25 changed by Cube

I can't really explain why this solution works, I do not really understand perl. Without my modification @$rdata[0] in the comparison is an array, that's why it does not work.
But look at line 4602 or 4649, there it is done the same way.

Replying to rats:

can you please show me you're ispCP-Crontab for AWStats.

/etc/cron.d/ispcp:

# [domain.de] AWStats static tasks START.
2 3  * * *   root perl /var/www/ispcp/engine/awstats/awstats_buildstaticpages.pl -config=domain.de -update -lang=de -awstatsprog=/usr/lib/cgi-bin/awstats.pl -dir=/var/www/virtual/ubile.de/statistics/ >/dev/null 2>&1
# [domain.de] AWStats static tasks END.

dmn_awstats_entry.tpl:

{MINUTE} {HOUR}  * * *   root perl /var/www/ispcp/engine/awstats/awstats_buildstaticpages.pl -config={DMN_NAME} -update -lang={USER_LANG} -awstatsprog=/usr/lib/cgi-bin/awstats.pl -dir=/var/www/virtual/{DMN_NAME}/statistics/ >/dev/null 2>&1


Add/Change #836 (Static awstats in user's language)




Action