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
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 Your scipt is sending HTTP headers as output? Wonder why that is? But, the error code returned was 0, which is good.
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
Was that all your debug output? It went straigth from returned: 0 to Login incorrect? Perhaps you could post the whole debug output?
participants (2)
-
Dusty Doris -
Pezhman Lali