php and freeradius

Pezhman Lali pezhman_lali at yahoo.com
Wed Feb 15 10:59:35 CET 2006


hi 
this is my php test file:
#!/usr/bin/php
<?php
$u="root";
$p="";
$h="radius";
$con=mysql_connect($h,$u,$p);
mysql_select_db('radius');
$query="";
mysql_close($con);
$f = fopen('./php.log','w');
fwrite($f,print_r($_ENV,TRUE));
fclose($f);
exit(0);
?>

and php exec module:
exec authphp {
                 wait = yes
                 program = "${raddbdir}/test.php "
                 input_pairs = request
                 output_pairs = request
         }

because of exit(0) in php script I believe every one
must be accepted, but the freeradius reject everyone,
and this is my debug mode output:
        User-Name = "reza"
        User-Password = "1234"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 12
Exec-Program: /usr/local/etc/raddb/test.php
Exec-Program-Wait: plaintext: Content-type: text/html 
X-Powered-By: PHP/4.3.4
Exec-Program: returned: 0
Login incorrect: [reza/1234] (from client radius port
12)
rad_recv: Access-Request packet from host
127.0.0.1:37157, id=224, length=56
Sending Access-Reject of id 224 to 127.0.0.1:37157

let me know where is  problem?
best



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Freeradius-Devel mailing list