Search squid archive

Re: Helper doent authentify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 







From: squid-users <squid-users-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Antony Stone <Antony.Stone@xxxxxxxxxxxxxxxxxxxx>
Sent: Monday, December 11, 2017 9:27 PM
To: squid-users@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [squid-users] Helper doent authentify
 
On Monday 11 December 2017 at 22:19:53, Edwin Quijada wrote:

> Hi!
> I am trying to do a helper for use with Squid. I did my helper but it
> doesnt authentify
>
> <?php
>
> $f = fopen("php://stdin", "r");
> while (!(feof($f)))
> {
>     $line = fgets($f);
>     if ($line)
>      {
>         $fields = explode(' ', trim($line));
>         $username = rawurldecode($fields[0]);
>         $password = rawurldecode($fields[1]);
>
>         if ($username=="edwin" &&  $password=="1234")
>          fwrite(STDOUT, "OK\n");
>         else
>          fwrite(STDOUT, "ERR\n");
>     }
> }
> ?>
>
> when I put the values it continues asked me user/password

I think "$f" might be your problem.

See http://freesoftwaremagazine.com/articles/authentication_with_squid/ for


I copied my example from this page. 😞
If I run the script it works fine , returns OK or ERR that is suppose to receive


what might be a clue (sorry, I'm not really a PHP coder).


Antony.

--
Why is "dylexia" so difficult to spell, and why can I never remember "aphasia"
when I want to?

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux