Based on the docu I should setup something similar to external_acl_type MyAclHelper %SRC %LOGIN %{Host} /usr/local/squid/libexec/myaclhelper However I only want to authenticate based on src IP so I want to use : external_acl_type MyAclHelper %SRC /usr/local/squid/libexec/myaclhelper I am not getting any errors right now, but I am getting access denied, although the script echoes OK, and it works using stdin Regards On Thu, Jan 24, 2013 at 3:44 PM, Ali Jawad <alijawad1@xxxxxxxxx> wrote: > Thanks for that I did change the script to > > <?php > $f = fopen( 'php://stdin', 'r' ); > > while( $line = fgets( $f ) ) { > echo "OK"; > } > > > ?> > > while testing in command line using : > > /usr/bin/php myaclhelper.php > > Each time I press enter it returns OK, it keeps running and does not > exit. However in squid log I get : > > The MyAclHelper helpers are crashing too rapidly, need help! > > What I think is wrong is that I need to identify what needs to handle > the script, I.e. how does squid know this is a php script and not a > perl script ? > > Regards > > > On Thu, Jan 24, 2013 at 12:02 PM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote: >> On 24/01/2013 10:44 p.m., Ali Jawad wrote: >>> >>> Hi >>> Checking the db and echoing OK or ERR based on that is easy for me to >>> implement in php, for now I did add the following : >>> >>> external_acl_type MyAclHelper %SRC /etc/squid/myaclhelper.php >>> >>> myaclhelper.php only contains >>> <?php >>> echo "OK"; >>> ?> >>> >>> Later on I want to replace that with a mysqldb check and read stdin to >>> obtain %SRC, but for now I just want this to work, when squid starts I >>> get the following in the log : >>> >>> The MyAclHelper helpers are crashing too rapidly, need help! >>> >>> Any help with this simple setup please ? >> >> >> >> You need a loop. >> >> Please read the intro section from the link below on how helpers operate >> under Squid: >> http://wiki.squid-cache.org/Features/AddonHelpers#How_do_the_helpers_communicate_with_Squid.3F >> >> (I have just updated it to clarify the I/O criteria helpers must follow and >> what the consequences are). >> >> Amos