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

Error using squid & pfblocker

Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
7 Posts 4 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.
  • S
    salida
    last edited by May 19, 2014, 7:25 PM May 19, 2014, 11:41 AM

    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
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by May 19, 2014, 11:50 AM

      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 May 19, 2014, 7:19 PM

        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
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by May 19, 2014, 7:27 PM

          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 May 19, 2014, 7:51 PM

            @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
            • B
              bmeeks
              last edited by May 20, 2014, 3:44 AM

              @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 May 20, 2014, 8:18 AM

                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
                7 out of 7
                • First post
                  7/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received