update control and reply in 1 php page
Alan DeKok
aland at deployingradius.com
Sat Apr 28 23:13:21 CEST 2018
On Apr 28, 2018, at 3:07 PM, تعلم البرمجة <mido2010bona at gmail.com> wrote:
> I am using freeradius 3.0.11 and iam using this :
>
> update{
> control: += `/usr/bin/php5.6 /var/www/html/update.php %{User-Name}
> %{User-Password} 1`
> }
> update{
> reply: += `/usr/bin/php5.6 /var/www/html/update.php %{User-Name}
> %{%{User-Password}} 2 `
> }
It's best to not use external scripts.
> update.php
>
> <?php
> $user = @$argv[1];
> $pass = @$argv[2];
> $val = @$argv[3];
>
> if ($val == 1){
> echo "Framed-Pool :=pool1\n";
> }else{
> echo "Reply-Message :=Hello '\n";
> }
All that can be done in "unlang". There's no need to use PHP.
> ?>
>
> but this code is very slow and i want do this
Use unlang. Don't use PHP.
Alan DeKok.
More information about the Freeradius-Users
mailing list