freeradius agent and "PHP Fatal error: Call-time pass-by-reference has been removed in" [SEC=UNCLASSIFIED]
ref 1: http://wiki.freeradius.org/config/Status ref 2: http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-referen...
freeradius v3.0 php5 v5.5
I've updated $radmsg IAW ref 1 $radmsg = "Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = $ statstype, Response-Packet-Type = Access-Accept";
running radclient as noted in ref1 also works. So all setup and working.
ref2 indicates the fault is easy to fix but i can't understand it. -------- dc2radius1:/usr/lib/observium_agent/local root $ ./freeradius PHP Fatal error: Call-time pass-by-reference has been removed in /usr/lib/observium_agent/local/freeradius on line 54 --------
line 54: exec("echo '$radmsg' | $radcmd", &$out, $retval);
how might line 54 be altered to actually run. The alternatively is to rewrite it as a shell script (cause thats how programmers work, they rewrite in the language they know).
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
removing the ampersand might suffice.
adam.
Sent from Mailbird [http://www.getmailbird.com/?utm_source=Mailbird&utm_medium=email&utm...] On 09/03/2016 01:47:33, peter.hine@familycourt.gov.au peter.hine@familycourt.gov.au wrote:
ref 1: http://wiki.freeradius.org/config/Status ref 2: http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-referen...
freeradius v3.0 php5 v5.5
I've updated $radmsg IAW ref 1 $radmsg = "Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = $ statstype, Response-Packet-Type = Access-Accept";
running radclient as noted in ref1 also works. So all setup and working.
ref2 indicates the fault is easy to fix but i can't understand it. -------- dc2radius1:/usr/lib/observium_agent/local root $ ./freeradius PHP Fatal error: Call-time pass-by-reference has been removed in /usr/lib/observium_agent/local/freeradius on line 54 --------
line 54: exec("echo '$radmsg' | $radcmd", &$out, $retval);
how might line 54 be altered to actually run. The alternatively is to rewrite it as a shell script (cause thats how programmers work, they rewrite in the language they know).
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
thanks Adam
that stops the error but doesn't work. "./freeradius <<<freeradius>>>"
i rewrote it as bash
#!/bin/sh
###########moved to freeradius.conf #client="/usr/bin/radclient"; #secret="adminsecret"; #port="18121"; #timeout=2; # Timeout for each attempt in seconds #retries=3; # Number of times to try ###########moved to freeradius.conf
msg1="Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Authentication, Response-Packet-Type = Access-Accept" msg2="Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Accounting, Response-Packet-Type = Access-Accept"
SCRIPT=`which $0` SCRIPTDIR=`dirname $SCRIPT` ABSPATH="`cd "$SCRIPTDIR" 2>/dev/null && pwd`"
. $ABSPATH/freeradius.conf
echo '<<<freeradius>>>' (echo "$msg1" | $client -x -t $timeout -r $retries 127.0.0.1:$port status $secret;echo "$msg2" | $client -x -t $timeout -r $retries 127.0.0.1:$port status $secret) | awk '/FreeRADIUS-Total/{print $1":"$3}'
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
Hi Peter,
I don't want to copy/paste that from an email, since I can't test it, could you attach it, or put it somewhere which is wgettable? Could you also make it load a freeradius.cnf for config variables if it exists?
adam.
Sent from Mailbird [http://www.getmailbird.com/?utm_source=Mailbird&utm_medium=email&utm...] On 10/03/2016 00:19:59, peter.hine@familycourt.gov.au peter.hine@familycourt.gov.au wrote:
thanks Adam
that stops the error but doesn't work. "./freeradius
"
i rewrote it as bash
#!/bin/sh
###########moved to freeradius.conf #client="/usr/bin/radclient"; #secret="adminsecret"; #port="18121"; #timeout=2; # Timeout for each attempt in seconds #retries=3; # Number of times to try ###########moved to freeradius.conf
msg1="Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Authentication, Response-Packet-Type = Access-Accept" msg2="Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Accounting, Response-Packet-Type = Access-Accept"
SCRIPT=`which $0` SCRIPTDIR=`dirname $SCRIPT` ABSPATH="`cd "$SCRIPTDIR" 2>/dev/null && pwd`"
. $ABSPATH/freeradius.conf
echo '>>' (echo "$msg1" | $client -x -t $timeout -r $retries 127.0.0.1:$port status $secret;echo "$msg2" | $client -x -t $timeout -r $retries 127.0.0.1:$port status $secret) | awk '/FreeRADIUS-Total/{print $1":"$3}'
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Funny,
It was a bash script, and someone replaced it by a php script that doesn't seem to work, so someone wrote a bash script =)
Tom
On 10/03/2016 01:23, Adam Armstrong wrote:
Hi Peter,
I don't want to copy/paste that from an email, since I can't test it, could you attach it, or put it somewhere which is wgettable? Could you also make it load a freeradius.cnf for config variables if it exists?
adam.
Sent from Mailbird http://www.getmailbird.com/?utm_source=Mailbird&utm_medium=email&utm_campaign=sent-from-mailbird
On 10/03/2016 00:19:59, peter.hine@familycourt.gov.au peter.hine@familycourt.gov.au wrote:
thanks Adam
that stops the error but doesn't work. "./freeradius
"
i rewrote it as bash
#!/bin/sh
###########moved to freeradius.conf #client="/usr/bin/radclient"; #secret="adminsecret"; #port="18121"; #timeout=2; # Timeout for each attempt in seconds #retries=3; # Number of times to try ###########moved to freeradius.conf
msg1="Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Authentication, Response-Packet-Type = Access-Accept" msg2="Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Accounting, Response-Packet-Type = Access-Accept"
SCRIPT=`which $0` SCRIPTDIR=`dirname $SCRIPT` ABSPATH="`cd "$SCRIPTDIR" 2>/dev/null && pwd`"
. $ABSPATH/freeradius.conf
echo '>>' (echo "$msg1" | $client -x -t $timeout -r $retries 127.0.0.1:$port status $secret;echo "$msg2" | $client -x -t $timeout -r $retries 127.0.0.1:$port status $secret) | awk '/FreeRADIUS-Total/{print $1":"$3}'
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail.
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
i use the freeradius php script and it works perfectly fine on our servers?
so long as you remember to start the freeradius service unlike me sometimes lol
Simon
On 10 Mar 2016, at 8:13 am, Tom Laermans tom.laermans@powersource.cx wrote:
Funny,
It was a bash script, and someone replaced it by a php script that doesn't seem to work, so someone wrote a bash script =)
Tom
On 10/03/2016 01:23, Adam Armstrong wrote:
Hi Peter,
I don't want to copy/paste that from an email, since I can't test it, could you attach it, or put it somewhere which is wgettable? Could you also make it load a freeradius.cnf for config variables if it exists?
adam.
Sent from Mailbird http://www.getmailbird.com/?utm_source=Mailbird&utm_medium=email&utm_campaign=sent-from-mailbirdOn 10/03/2016 00:19:59, peter.hine@familycourt.gov.au mailto:peter.hine@familycourt.gov.au peter.hine@familycourt.gov.au mailto:peter.hine@familycourt.gov.au wrote:
thanks Adam
that stops the error but doesn't work. "./freeradius
"
i rewrote it as bash
#!/bin/sh
###########moved to freeradius.conf #client="/usr/bin/radclient"; #secret="adminsecret"; #port="18121"; #timeout=2; # Timeout for each attempt in seconds #retries=3; # Number of times to try ###########moved to freeradius.conf
msg1="Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Authentication, Response-Packet-Type = Access-Accept" msg2="Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = Accounting, Response-Packet-Type = Access-Accept"
SCRIPT=`which $0` SCRIPTDIR=`dirname $SCRIPT` ABSPATH="`cd "$SCRIPTDIR" 2>/dev/null && pwd`"
. $ABSPATH/freeradius.conf
echo '>>' (echo "$msg1" | $client -x -t $timeout -r $retries 127.0.0.1:$port status $secret;echo "$msg2" | $client -x -t $timeout -r $retries 127.0.0.1:$port status $secret) | awk '/FreeRADIUS-Total/{print $1":"$3}'
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au mailto:peter.hine@familycourt.gov.au
The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail.
observium mailing list observium@observium.org mailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org mailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
we are doomed to repeat ourselves .... P
we are doomed to repeat ourselves .... P
From: Tom Laermans tom.laermans@powersource.cx To: Observium Network Observation System observium@observium.org Date: 10/03/2016 19:14 Subject: Re: [Observium] freeradius agent and "PHP Fatal error: Call-time pass-by-reference has been removed in" [SEC=UNCLASSIFIED] Sent by: "observium" observium-bounces@observium.org
Funny,
It was a bash script, and someone replaced it by a php script that doesn't seem to work, so someone wrote a bash script =)
Tom
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
participants (4)
-
Adam Armstrong
-
Peter.Hine@familycourt.gov.au
-
Simon Smith
-
Tom Laermans