Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    SquidGuard problem

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 2 Posters 2.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dnegreira
      last edited by

      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:

      util.inc:
      function is_iprange($range) {
              if (substr_count($range, '-') != 1) {
                      return false;
              }
              list($ip1, $ip2) = explode ('-', $range);
              return (is_ipaddr($ip1) && is_ipaddr($ip2));
      }
      
      
      /usr/local/pkg/squidguard_configurator.inc:
      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!

      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by

        Reinstall squidGuard. This bug already fixed http://pfsense.org/packages/config/squidGuard/squidguard_configurator.inc

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • D
          dnegreira
          last edited by

          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 ?

          1 Reply Last reply Reply Quote 0
          • D
            dvserg
            last edited by

            Rename
            usr/local/pkg/squidguard_configurator.inc:

            
            function is_iprange($ip_range) {
            
            

            as

            
            function is_iprange_new($ip_range) {
            
            

            SquidGuardDoc EN  RU Tutorial
            Localization ru_PFSense

            1 Reply Last reply Reply Quote 0
            • D
              dnegreira
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.