Home
 

How to Fix “DG version: false” Error in DansGuardian Webmin Module Error


DansGuardian is a web content filtering solution that runs on Linux and offers a lot of flexibility. DansGuardian is not free for use in commercial organizations, but is free for personal use and educational institutions. I have been working with DansGuardian for six years now, as I do happen to be employed by a K-12 school system. DansGuardian has been a perfect filtering solution for our school department. I have seen this product grow and improve in both features and in performance. While DansGuardian is easy enough to manage using the text files, the Webmin module makes it that much easier. Examining the logs is also much easier with the Webmin DansGuardian module.


After upgrading to DansGuardian to version 2.9 (I think it was) my existing Webmin module would no longer work. I searched long and hard for ways to get DansGuardian working with Webmin. Last year I did find a module located on this site momo-i.org that did work with version 2.9. Last week I loaded DansGuardian version 2.10 up on my home server and went looking for an updated DansGuardian module. I was surprised to find that one had finally been released on the original sourceforge project page that had originally provided this module. I installed the module, and tried it out. I was quite disappointed to find the error that I had seen so many times before. The version you have is not supported. Please get DansGuardian from dansguardian.org DG version: false


I checked and double checked the module config to make sure I had all of my paths set correctly. I then went back to source forge and verified that that were releasing this module for the new DansGuardian version. Next, I went digging for the line that was giving me the error. On my Fedora Core 9 machine I found the file I was looking for here: /usr/libexec/webmin/dansguardian/dansguardian-lib.pl ( /usr/libexec/webmin/dgweb/dansguardian-lib.pl if you are using the module from the momo-i.org site ) I search for the word ‘version’ and found the if condition that was causing the error. On line 53 of the SourceForge module (or line 65 of the momo-i.org module) change the line from return false; to return $1;. This line will tell the Webmin module that it is compatible with your version of DansGuardian.

After changing the line above I was able to manage the latest version of DansGuardian with both Webmin modules. While some people may have put the time in to figuring out why the module was reporting an incompatible version, I opted for the easy route. A quick Google search revealed that many people were experiencing the same issue, while others were reporting the module working with version 2.9. Having the Webmin interface for DansGuardian allows non-technical users to manage the filter. For example I have labs loaded with Ident (Auth) clients, which allows DansGuardian to identify users browsing through the filter. With a couple of mouse clicks a teacher can disable a single user’s Internet connection using the DansGuardian Webmin interface. The student is able to access all internal servers, but has no access to the Internet.

If you are looking for a content filter for your home business or school, check out DansGuardian.org. DansGuardian is loaded with customizable features that can help you filter web content.

11 Comments

  1. Chuck:

    OMG! I waited two years for a new Web Min module for dansguardian 2.9. I was stoked when I saw that there was a new one on sourceforge. Like you mine came up with the same friggin error that the earlier version gave me. I changed that ‘if’ statement like you said and it picked right up. Analyzing the logs is my primary use, but managing the lists rocks too using Web Min.

    Kudos on the tipz!

  2. John Dunn:

    So this really does not fix the problem, its more of a work around. I like DansGuardian, but the setup is a killer if you don’t use RPM files. It never compiles right for me, I always seem to be missing library files, etc. However when I use an RPM, it works great. I don’t think there is an RPM for 2.10 yet is there?

    JD

  3. momo-i:

    Hi,

    This issue has fixed(only check process). use dgweb-0.6.3.3.wbm 😉

  4. muzzo:

    Hi,

    I got this error when try to use ‘Display logfile’
    The error message as below :

    Error – Perl execution failed

    Can’t locate Compress/Zlib.pm in @INC (@INC contains: /usr/libexec/webmin /usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl .) at /usr/libexec/webmin/dgweb-0.6.3.3/logs.cgi line 110.
    BEGIN failed–compilation aborted at /usr/libexec/webmin/dgweb-0.6.3.3/logs.cgi line 110.

  5. momo-i:

    >Hi,
    >
    >I got this error when try to use ‘Display logfile’
    >The error message as below :
    >
    >Error – Perl execution failed

    Although I think that I should not answer here, please do as follows.
    # perl -MCPAN -e shell
    cpan> install Compress::Zlib

  6. Mark:

    momo-i, thanks for taking the time to stop by and update this page on your fix. More so, thanks for taking the time to put together the webmin module that allowed me to get users up and running with 2.9 last year!

    Mark

  7. Tommy Stacy:

    Mark,
    Thanks for documenting this. I just wanted to add for Ubuntu server 8.10 the file to be edited can be found here:
    /usr/share/webmin/dansguardian#

  8. rjc:

    “DansGuardian is not free for use in commercial organizations, but is free for personal use and educational institutions.”

    This restriction only applies if you download DansGuardian from http://dansguardian.org/ website – it is under GNU GPL.

  9. azecraze:

    >Hi,
    >
    >I got this error when try to use ‘Display logfile’
    >The error message as below :
    >
    >Error – Perl execution failed
    Error on line 1819

    This in DG 2.10.1.1 and after updating the webmin module as per above.

    My answer to this was initially to try and modify the log.cgi file, line 1819 as referenced in the error. But I soon realised that it was saying that you cant divide by zero, meaning that $linesRead was in fact zero. So modifying the $linesRead would do nothing, because it was not reading any lines. Ergo, it was not reading the logfile. I then found the correct location of the logfile and changed the location of the logfile path to point to this correct location using Module Config. Voila’ all working now.

  10. Pol35:

    If such be the real state of things, this is worse than solemn mockery. ,

  11. Jaaffer Sadiq:

    Hi,
    Thanks a lot.. It worked for me

Leave a comment