Re: How to fire a script

2003-08-14 Thread Alan DeKok
Stefan Auweiler [EMAIL PROTECTED] wrote:
 depending on a defined 'called-station-id' I will add a VSA to the
 accept message, which value must have some information from a mysql
 db.  I'm aware of the mysql part, but don't know how to add them
 into the access accept... And: can I use PHP for this?

  No.

 Are there any code snippets and an advice on how to call during the auth
 process?

  scripts/exec-program-wait

  Alan DeKok.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: How to fire a script

2003-08-14 Thread Fenn Bailey
  into the access accept... And: can I use PHP for this?
 
   No.
 
  Are there any code snippets and an advice on how to call 
 during the auth
  process?
 
   scripts/exec-program-wait
 

You actually could use PHP for your external program fired by
Exec-Program-Wait. PHP can be compiled as a standalone binary, with the
newer versions fully supporting command line operation (just like perl). You
simply have a '#!/usr/local/bin/php' as your magic escape string in your
scripts.

However, keep in mind that PHP probably has a much larger overhead/startup
cost than something nice like a native binary (or possibly even perl) - I
haven't done much testing.

I actually use PHP rather extensively for full standalone command
line/daemon type scripting, just for the re-usability of common classes that
I can develop for both web + other use.

(sorry, got slightly off-topic at the end there)

Fenn.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html