Error using squid & pfblocker
-
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
-
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
-
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
-
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/"
-
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; }
-
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
-
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.