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

    Error using squid & pfblocker

    2.2 Snapshot Feedback and Problems - RETIRED
    4
    7
    2.6k
    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.
    • S
      salida
      last edited by

      I can install squid succesfully but when i go the menu (proxy server) to change the settings i get the following error

      Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of squid_before_form_general(). in /usr/local/www/pkg_edit.php(123) : eval()'d code on line 1 
      

      i also get similar error using pfblocker when i enable it and click save

      Fatal error: Call-time pass-by-reference has been removed in /usr/local/www/pkg_edit.php(143) : eval()'d code on line 1 
      

      ***SORRY i Just saw the pinned article about package maintainers

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Which version of squid?

        The package maintainer needs to read my post and fix the package before it will work on 2.2: https://forum.pfsense.org/index.php?topic=76632.0

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • S
          salida
          last edited by

          i made the changes stated https://forum.pfsense.org/index.php?topic=76632.0 for squid but now i get this error

          Warning: dir(/usr/pbi/squid-i386/etc/squid/errors/): failed to open dir: No such file or directory in /etc/inc/pfsense-utils.inc on line 421
           Fatal error: Call to a member function read() on a non-object in /etc/inc/pfsense-utils.inc on line 422 
          
          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            There are probably other 2.2 issues that need fixed in the squid package. some paths in PBI now include "local/", so that is probably supposed to be "/usr/pbi/squid-i386/local/etc/squid/errors/"

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • S
              salida
              last edited by

              @jimp:

              There are probably other 2.2 issues that need fixed in the squid package. some paths in PBI now include "local/", so that is probably supposed to be "/usr/pbi/squid-i386/local/etc/squid/errors/"

              this is the code in line 421 and 422 stated in /etc/inc/pfsense-utils.inc

              /*
               *   get_dir: return an array of $dir
               */
              function get_dir($dir) {
              	$dir_array = array();
              	$d = dir($dir);
              	while (false !== ($entry = $d->read())) {
              		array_push($dir_array, $entry);
              	}
              	$d->close();
              	return $dir_array;
              }
              
              1 Reply Last reply Reply Quote 0
              • bmeeksB
                bmeeks
                last edited by

                @salida:

                i made the changes stated https://forum.pfsense.org/index.php?topic=76632.0 for squid but now i get this error

                Warning: dir(/usr/pbi/squid-i386/etc/squid/errors/): failed to open dir: No such file or directory in /etc/inc/pfsense-utils.inc on line 421
                 Fatal error: Call to a member function read() on a non-object in /etc/inc/pfsense-utils.inc on line 422 
                

                As Jim stated in his reply, this path does not exist on 2.2 snapshots due to a change in the way PBI packages are built –

                /usr/pbi/squid-i386/etc/squid/errors/
                

                You will need to find all places in the squid package PHP code where the path /usr/pbi/squid-i386/etc/squid is listed and change each instance to read this way:  /usr/pbi/squid-i386/local/etc/squid

                I am not the squid or pfblocker package maintainer, so I don't know how many places would need changing.  But if all these are fixed up, then the packages should work on 2.2 (but 2.2 only unless extra code is added to make adjustments when executing on 2.1 platforms).

                Bill

                1 Reply Last reply Reply Quote 0
                • P
                  phil.davis
                  last edited by

                  The challenge, should you wish to accept it, should be very like what was done to make bandwidthd work - https://github.com/pfsense/pfsense-packages/commit/dc690b55fe7b55b767af8461c4735ea4a3a60c3b
                  Define some constants for the various directory paths, set them differently depending on the pfSense version, use them to specify the needed paths in the code.

                  As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                  If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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