SquidGuard problem

  • Hi,

    When i go to the squidguard configuration via WebGUI i get this error message:

    Fatal error: Cannot redeclare is_iprange() (previously declared in /etc/inc/util.inc:194) in /usr/local/pkg/squidguard_configurator.inc on line 1800

    I can see that the same function is declared on both files, but are different from eachother:

    function is_iprange($range) {
            if (substr_count($range, '-') != 1) {
                    return false;
            list($ip1, $ip2) = explode ('-', $range);
            return (is_ipaddr($ip1) && is_ipaddr($ip2));
    function is_iprange($ip_range) {
        if (!is_string($ip_range))  return false;
        list($ip1,$ip2) = explode('-', $ip_range);
        if (!is_ipaddr($ip1) || !is_ipaddr($ip2)) return false;
        # ip2 < ip1 - wrong
        if (ipcmp(ip2, ip1) === -1) return false;
        return true;

    As you can see they do similar but different stuff.
    What should i do to correct this as i cannot configure SquidGuard?

    I already tried to reinstall/remove and install the package with no success.
    I am using 1.2.3-RELEASE and the squidguard package version: 1.3-2

    Thanks in advance!

  • Hum, i am unable to remove or reinstall that package at the moment.
    it sticks in that screen of the reinstall/deinstall process and it does nothing more than this message:

    Removing package…
    Loading package configuration squidguard.xml...
    Loading package instructions...

    I am able to reinstall/remove any other package that i have installed at the moment.
    What should i do ?

  • Rename

    function is_iprange($ip_range) {


    function is_iprange_new($ip_range) {

  • Hi,

    Thanks for your reply!

    I changed the function is_iprange to is_iprange_new and i had the function "is_ipaddr_valid" as it contains a call to the function is_iprange as well, I had only to change it to is_iprange_new and it is working like a charm, thanks.

    Kind regards,
    David Negreira.

Log in to reply