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

    Squidguard Warning: Unexpected character in input:

    Scheduled Pinned Locked Moved pfSense Packages
    15 Posts 2 Posters 8.8k 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.
    • T
      ToxIcon
      last edited by

      I was having trouble with uploading the  http://urlblacklist.com/cgi-bin/commercialdownload.pl?type=download&file=bigblacklist squidguard would give Fatal error: Allowed memory size so i followed this post http://forum.pfsense.org/index.php?PHPSESSID=6d83176effc5afad7d70d7bd5909047b&topic=11062.msg61376#msg61376 : so i went to Diagnostics: Edit file and load the /usr/local/pkg/squidguard_configurator.inc and change the ini_set('memory_limit to 90M, and when i go to services, proxy content i get the error ;Unexpected character in input: ''' (ASCII=39) state=1 in /usr/local/pkg/squidguard_configurator.inc on line 101 Parse error: syntax error, unexpected ')' in /usr/local/pkg/squidguard_configurator.inc on line 101 and squidguard wont start and i can't uninstall it help please.

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

        /* Allow additional execution time 0 = no limit. */
        ini_set('max_execution_time', '3600');
        ini_set('max_input_time', '3600');
        ini_set('memory_limit', '32M');
        

        TO

        
        /* Allow additional execution time 0 = no limit. */
        ini_set('max_execution_time', '3600');
        ini_set('max_input_time', '3600');
        ini_set('memory_limit', '96M');
        
        

        –-
        And in squiduard_configurator.php lines [100/101]:

        
        define('REDIRECT_BASE_URL', '/sgerror.php');
        define('REDIRECT_URL_ARGS', '&a=%a&n=%n&i=%i&s=%s&t=%t&u=%u');
        
        

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • T
          ToxIcon
          last edited by

          Squid guard still wont start and still cant uninstall, now i get
          Parse error: syntax error, unexpected '[' in /usr/local/pkg/squidguard_configurator.inc on line 100 
          on this line squiduard_configurator.php[100/101]:
          where do i insert this line

          here is a copy of the squidguard_configurator.inc file

          ?php

          –----------------------------------------------------------------------------

          /*  squidguard_configurator.inc
              (C)2006-2008 Serg Dvoriancev
              Redistribution and use in source and binary forms, with or without
              modification, are permitted provided that the following conditions are met:

          1. Redistributions of source code must retain the above copyright notice,
                 this list of conditions and the following disclaimer.

          2. Redistributions in binary form must reproduce the above copyright
                 notice, this list of conditions and the following disclaimer in the
                 documentation and/or other materials provided with the distribution.

          THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
              INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
              AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
              AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
              OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
              SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
              INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
              CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
              ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
              POSSIBILITY OF SUCH DAMAGE.
          */

          ------------------------------------------------------------------------------

          SquidGuard Configurator

          email: dv_serg@mail.ru

          ------------------------------------------------------------------------------

          squidGuard inline options:

          squidGuard -C all          - update database

          squidGuard -c <configfile>- create squidGuard with specified config file

          ------------------------------------------------------------------------------

          Notes:

          #   for work squidGuard need present ALL destinations;
          #   if dest not present in config - then this item will ignored in operations
          #   (in rebuild DB for example)

          ------------------------------------------------------------------------------

          Directories:

          work path - $workdir

          log path  - $workdir   $logdir

          ------------------------------------------------------------------------------

          require_once('globals.inc');
          require_once('config.inc');
          require_once('util.inc');
          require_once('pfsense-utils.inc');
          require_once('pkg-utils.inc');
          require_once('filter.inc');
          require_once('service-utils.inc');
          require_once('squid.inc');

          /* Allow additional execution time 0 = no limit. */
          ini_set('max_execution_time', '3600');
          ini_set('max_input_time', '3600');
          ini_set('memory_limit', '96M');

          ------------------------------------------------------------------------------

          files header

          ------------------------------------------------------------------------------

          define('FILES_DB_HEADER', '

          ------------------------------------------------------------------------------

          File created by squidGuard package GUI

          (C)2006-2008 Serg Dvoriancev

          ------------------------------------------------------------------------------

          ');

          define('CONFIG_SG_HEADER', "

          ============================================================

          SquidGuard configuration file

          This file generated automaticly with SquidGuard configurator

          (C)2006 Serg Dvoriancev

          email: dv_serg@mail.ru

          ============================================================

          ");

          define('ACL_WARNING_ABSENSE_PASS', "!WARNING! Absence PASS 'all' or 'none' added as 'none'");

          ------------------------------------------------------------------------------

          squid config options

          ------------------------------------------------------------------------------

          define('REDIRECTOR_OPTIONS_REM', '# squidGuard options');
          define('REDIRECTOR_PROGRAM_OPT', 'redirect_program');
          define('REDIRECT_BYPASS_OPT',    'redirector_bypass');
          define('REDIRECT_CHILDREN_OPT',  'redirect_children');

          ------------------------------------------------------------------------------

          setup count redirector processes will started

          * for big count users service increase this option, but you need use this on powerful system

          ------------------------------------------------------------------------------

          define('REDIRECTOR_PROCESS_COUNT', '3');

          ------------------------------------------------------------------------------

          squidguard config options

          ------------------------------------------------------------------------------

          define default redirection url (redirector get this url for all blocked url's)

          * !ATTENTION! this url must be exists; IF url not exist, redirector will't block

          #               (returned to squid some url, what blocked)

          ------------------------------------------------------------------------------

          squiduard_configurator.php[100/101]:

          define('REDIRECT_BASE_URL', '/sgerror.php');
          define('REDIRECT_URL_ARGS', '</configfile>

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

            Delete this string:
            squiduard_configurator.php[100/101]:

            SquidGuardDoc EN  RU Tutorial
            Localization ru_PFSense

            1 Reply Last reply Reply Quote 0
            • T
              ToxIcon
              last edited by

              I Delete this string: squiduard_configurator.php[100/101] and i still get the 
              Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /usr/local/pkg/squidguard_configurator.inc on line 101 Parse error: syntax error, unexpected $end in /usr/local/pkg/squidguard_configurator.inc on line 101

              –----------------------------------------------------------------------------

              /*  squidguard_configurator.inc
                  (C)2006-2008 Serg Dvoriancev
                  Redistribution and use in source and binary forms, with or without
                  modification, are permitted provided that the following conditions are met:

              1. Redistributions of source code must retain the above copyright notice,
                    this list of conditions and the following disclaimer.

              2. Redistributions in binary form must reproduce the above copyright
                    notice, this list of conditions and the following disclaimer in the
                    documentation and/or other materials provided with the distribution.

              THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
                  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
                  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
                  AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
                  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                  POSSIBILITY OF SUCH DAMAGE.
              */

              ------------------------------------------------------------------------------

              SquidGuard Configurator

              email: dv_serg@mail.ru

              ------------------------------------------------------------------------------

              squidGuard inline options:

              squidGuard -C all          - update database

              squidGuard -c <configfile>- create squidGuard with specified config file

              ------------------------------------------------------------------------------

              Notes:

              #  for work squidGuard need present ALL destinations;
              #  if dest not present in config - then this item will ignored in operations
              #  (in rebuild DB for example)

              ------------------------------------------------------------------------------

              Directories:

              work path - $workdir

              log path  - $workdir  $logdir

              ------------------------------------------------------------------------------

              require_once('globals.inc');
              require_once('config.inc');
              require_once('util.inc');
              require_once('pfsense-utils.inc');
              require_once('pkg-utils.inc');
              require_once('filter.inc');
              require_once('service-utils.inc');
              require_once('squid.inc');

              /* Allow additional execution time 0 = no limit. */
              ini_set('max_execution_time', '3600');
              ini_set('max_input_time', '3600');
              ini_set('memory_limit', '96M');

              ------------------------------------------------------------------------------

              files header

              ------------------------------------------------------------------------------

              define('FILES_DB_HEADER', '

              ------------------------------------------------------------------------------

              File created by squidGuard package GUI

              (C)2006-2008 Serg Dvoriancev

              ------------------------------------------------------------------------------

              ');

              define('CONFIG_SG_HEADER', "

              ============================================================

              SquidGuard configuration file

              This file generated automaticly with SquidGuard configurator

              (C)2006 Serg Dvoriancev

              email: dv_serg@mail.ru

              ============================================================

              ");

              define('ACL_WARNING_ABSENSE_PASS', "!WARNING! Absence PASS 'all' or 'none' added as 'none'");

              ------------------------------------------------------------------------------

              squid config options

              ------------------------------------------------------------------------------

              define('REDIRECTOR_OPTIONS_REM', '# squidGuard options');
              define('REDIRECTOR_PROGRAM_OPT', 'redirect_program');
              define('REDIRECT_BYPASS_OPT',    'redirector_bypass');
              define('REDIRECT_CHILDREN_OPT',  'redirect_children');

              ------------------------------------------------------------------------------

              setup count redirector processes will started

              * for big count users service increase this option, but you need use this on powerful system

              ------------------------------------------------------------------------------

              define('REDIRECTOR_PROCESS_COUNT', '3');

              ------------------------------------------------------------------------------

              squidguard config options

              ------------------------------------------------------------------------------

              define default redirection url (redirector get this url for all blocked url's)

              * !ATTENTION! this url must be exists; IF url not exist, redirector will't block

              #              (returned to squid some url, what blocked)

              ------------------------------------------------------------------------------

              define('REDIRECT_BASE_URL', '/sgerror.php');
              define('REDIRECT_URL_ARGS', '&a=%a&n=%n&i=%i&s=%s&t=%t&u=%u');</configfile>

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

                Email me pls  - i sent you full file.

                SquidGuardDoc EN  RU Tutorial
                Localization ru_PFSense

                1 Reply Last reply Reply Quote 0
                • T
                  ToxIcon
                  last edited by

                  ok I sent you an Email

                  1 Reply Last reply Reply Quote 0
                  • T
                    ToxIcon
                    last edited by

                    I went to Diagnostics: Edit /usr/local/pkg/squidguard_configurator.inc
                    copy the text from thesquidguard_configurator.inc you sent  and paste to the Diagnostics: Edit /usr/local/pkg/squidguard_configurator.inc file
                    but still got error

                    Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /usr/local/pkg/squidguard_configurator.inc on line 101 Parse error: syntax error, unexpected $end in /usr/local/pkg/squidguard_configurator.inc on line 101

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

                      You replaced ALL or only part of file ?

                      SquidGuardDoc EN  RU Tutorial
                      Localization ru_PFSense

                      1 Reply Last reply Reply Quote 0
                      • T
                        ToxIcon
                        last edited by

                        I replaced ALL of file but it seem like its not saving all of the files once i reopen the files it ends at

                        define('REDIRECT_BASE_URL', '/sgerror.php');
                        define('REDIRECT_URL_ARGS', '

                        do you think it might be a permission issue
                        how can i check and reset all permission on the file

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

                          You must replace squidguard_configurator via Win3scp or upload file.
                          Probably GUI make incorrect change.

                          SquidGuardDoc EN  RU Tutorial
                          Localization ru_PFSense

                          1 Reply Last reply Reply Quote 0
                          • T
                            ToxIcon
                            last edited by

                            nothing seems to work i guest I will have to totally trash everything and reinstall pfsense next week sometime or wait for squidguard update with the new memory fix

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

                              Can you take online help ?

                              SquidGuardDoc EN  RU Tutorial
                              Localization ru_PFSense

                              1 Reply Last reply Reply Quote 0
                              • T
                                ToxIcon
                                last edited by

                                Yes I can take online help
                                followed your instructions
                                everything is working great thanks for all your help

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

                                  Good.  ::)

                                  SquidGuardDoc EN  RU Tutorial
                                  Localization ru_PFSense

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