On Wed, 03 Mar 2010, Jonas Smedegaard wrote: > Thanks a lot for reporting this! "pleasure" is mine ;)
> Could you be persuaded to dig one step deeper and try locate where > it does not fail properly? I imagine (without looking at the code > at all) that it is simply a shell script which needs a "set -e" > somewhere... well -- it is the native call to awstats.pl (and I am not very verse in perl, especially debugging it)... so here is what I was getting... doh -- screen history didn't store that far... ok -- lets replicate ones again: awst...@pymvpa:~$ ls -l /etc/awstats/awstats.custom.conf -rw------- 1 root root 172 2010-03-03 12:25 /etc/awstats/awstats.custom.conf awst...@pymvpa:~$ /usr/lib/cgi-bin/awstats.pl -config=custom -debug=2 | head -15 Wed Mar 3 12:27:27 2010 - DEBUG 1 - Awstats - 6.7 (build 1.892) - Perl /usr/bin/perl 5.010000 Wed Mar 3 12:27:27 2010 - DEBUG 2 - DIR=/usr/lib/cgi-bin PROG=awstats Extension=pl Wed Mar 3 12:27:27 2010 - DEBUG 2 - QUERY_STRING=config=custom&debug=2 Wed Mar 3 12:27:27 2010 - DEBUG 1 - HTMLOutput= Wed Mar 3 12:27:27 2010 - DEBUG 2 - YearRequired=2010, MonthRequired=03 Wed Mar 3 12:27:27 2010 - DEBUG 2 - DayRequired=, HourRequired= Wed Mar 3 12:27:27 2010 - DEBUG 2 - UpdateFor=0 Wed Mar 3 12:27:27 2010 - DEBUG 2 - PluginMode= Wed Mar 3 12:27:27 2010 - DEBUG 2 - DirConfig= Wed Mar 3 12:27:27 2010 - DEBUG 1 - Config file read was "/etc/awstats/awstats.conf.local" (level 2) Wed Mar 3 12:27:27 2010 - DEBUG 1 - Config file read was "/etc/awstats/awstats.conf" (level 1) Wed Mar 3 12:27:27 2010 - DEBUG 1 - Search an available language among HTTP_ACCEPT_LANGUAGE= Wed Mar 3 12:27:27 2010 - DEBUG 1 - No language defined or available. Will use Lang=en Wed Mar 3 12:27:27 2010 - DEBUG 1 - Call to Check_Config Wed Mar 3 12:27:27 2010 - DEBUG 2 - LogFile='/var/log/apache2/access.log-all' as you see - no custom was read, no puke in debug msg, and if I run without debug: awst...@pymvpa:~$ /usr/lib/cgi-bin/awstats.pl -config=custom Create/Update database for config "/etc/awstats/awstats.conf" by AWStats version 6.7 (build 1.892) From data in log file "/var/log/apache2/access.log-all"... Phase 1 : First bypass old records, searching new record... Direct access after last parsed record (after line 7134) Jumped lines in file: 7134 Found 7134 already parsed records. Parsed lines in file: 0 Found 0 dropped records, Found 0 corrupted records, Found 0 old records, Found 0 new qualified records. so it digested only /etc/awstats/awstats.conf and proceeded as everything was fine... lets now "fix" the permissions: awst...@pymvpa:~$ ls -l /etc/awstats/awstats.custom.conf -rw-r--r-- 1 root root 172 2010-03-03 12:25 /etc/awstats/awstats.custom.conf awst...@pymvpa:~$ /usr/lib/cgi-bin/awstats.pl -config=custom Error: AWStats database directory defined in config file by 'DirData' parameter (/home/www/awstats/lib/custom) does not exist or is not writable. Setup ('/etc/awstats/awstats.custom.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory). Finally it read the bloody file! ;) disregard the error -- I've created this config just to show the problem ;-) -- .-. =------------------------------ /v\ ----------------------------= Keep in touch // \\ (yoh@|www.)onerussian.com Yaroslav Halchenko /( )\ ICQ#: 60653192 Linux User ^^-^^ [175555]
signature.asc
Description: Digital signature