<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I recommend using Guzzle. </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><a href="http://docs.guzzlephp.org/en/stable/" class="OWAAutoLink" id="LPlnk315189">http://docs.guzzlephp.org/en/stable/</a></p>
<div id="LPBorder_GT_15181633902700.975672736404269" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15181633902660.3885478744613031" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15181633902660.768366165508938" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15181633902660.24490155252982526"></div>
<div id="LPTitle_15181633902660.5071017127886857" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15181633902680.8187288737811258" href="http://docs.guzzlephp.org/en/stable/" target="_blank" style="text-decoration: none;">Guzzle, PHP HTTP client — Guzzle Documentation</a></div>
<div id="LPMetadata_15181633902680.2824746356373826" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
docs.guzzlephp.org</div>
<div id="LPDescription_15181633902690.6340470535589673" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Guzzle Documentation¶ Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services. Simple interface for building ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Fra:</b> Kea-users <kea-users-bounces@lists.isc.org> på vegne av kea-users-request@lists.isc.org <kea-users-request@lists.isc.org><br>
<b>Sendt:</b> 9. februar 2018 08:54:10<br>
<b>Til:</b> kea-users@lists.isc.org<br>
<b>Emne:</b> Kea-users Digest, Vol 44, Issue 6</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Send Kea-users mailing list submissions to<br>
kea-users@lists.isc.org<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
kea-users-request@lists.isc.org<br>
<br>
You can reach the person managing the list at<br>
kea-users-owner@lists.isc.org<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Kea-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. kea-ctrl-agent - request by php/curl (Zayer, Sebastian)<br>
2. Re: kea-ctrl-agent - request by php/curl (Marcin Siodelski)<br>
3. Support Request (Evren Yilmaz)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 8 Feb 2018 14:35:05 +0000<br>
From: "Zayer, Sebastian" <Sebastian.Zayer@takko.de><br>
To: "KEA-Users (kea-users@lists.isc.org)" <kea-users@lists.isc.org><br>
Subject: [Kea-users] kea-ctrl-agent - request by php/curl<br>
Message-ID: <995afaae445f4d7e882628e359a2257c@takko.de><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Hey there,<br>
<br>
i'm trying to control the kea server by using the control agent.<br>
<br>
I already implemented a web-frontend to the database (mysql) to show all the leases and reservations.<br>
Now I'm trying to get the running configuration by requesting the control agent.<br>
<br>
$msg = array("command" => "config-get", "service" => "[ dhcp4 ]");<br>
$message = json_encode($msg);<br>
<br>
//$message = '{ "command": "config-get", "service": "dhcp4" }';<br>
$len = strlen($message);<br>
<br>
echo print_r($message, true), "\n";<br>
<br>
$ch = curl_init('<a href="http://127.0.0.1:8080/">http://127.0.0.1:8080/</a>');<br>
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");<br>
curl_setopt($ch, CURLOPT_POSTFIELDS, $message);<br>
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br>
curl_setopt($ch, CURLOPT_HTTPHEADER, array(<br>
'Content-type: application/json',<br>
'Content-Length: '. $len)<br>
);<br>
curl_setopt($ch, CURLOPT_TIMEOUT, 10);<br>
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);<br>
<br>
$ret = curl_exec($ch);<br>
if($ret === false)<br>
{<br>
echo 'Curl error: ' . curl_error($ch);<br>
}<br>
else<br>
{<br>
echo print_r($ret, true);<br>
echo 'Operation completed without any errors';<br>
}<br>
<br>
All I receive is the following:<br>
{"command":"config-get","service":"[ dhcp4 ]"}<br>
{ "result": 400, "text": "Bad Request" }<br>
Operation completed without any errors<br>
<br>
<br>
I tried a lot of things:<br>
<br>
- dhcp4 with or without brackets<br>
<br>
- using the documented string (<a href="http://kea.isc.org/docs/kea-guide.html#ctrl-channel-client">http://kea.isc.org/docs/kea-guide.html#ctrl-channel-client</a>)<br>
<br>
- with and without timeouts<br>
<br>
- different HTTPHEADER (with, and without Content-Length like in the documentation)<br>
<br>
The service is up and running, if i'm using the shell and curl the example works.<br>
I also tried to get a clue by reading the log (DEBUG, Level 99) but there is just a lousy message "HTTP_DATA_RECEIVED received 152 bytes from 127.0.0.1" and "DEBUG [kea-ctrl-agent.http] HTTP_RESPONSE_SEND sending HTTP response HTTP/1.1 400 Bad Request#015#012
to 127.0.0.1"<br>
<br>
Does anybody have a clue how to successfully connect and receive a proper message?<br>
<br>
<br>
Thanks in advance<br>
<br>
Sebastian<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.isc.org/pipermail/kea-users/attachments/20180208/69c7827c/attachment-0001.html">https://lists.isc.org/pipermail/kea-users/attachments/20180208/69c7827c/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 8 Feb 2018 17:13:07 +0100<br>
From: Marcin Siodelski <marcin@isc.org><br>
To: "Zayer, Sebastian" <Sebastian.Zayer@takko.de>, "KEA-Users<br>
(kea-users@lists.isc.org)" <kea-users@lists.isc.org><br>
Subject: Re: [Kea-users] kea-ctrl-agent - request by php/curl<br>
Message-ID: <3c4a205e-700a-8cec-09a9-d8c487a76218@isc.org><br>
Content-Type: text/plain; charset=windows-1252<br>
<br>
<br>
I am hoping that the only thing that you have to correct is to do this:<br>
<br>
"service" => [ "dhcp4" ]<br>
<br>
rather than<br>
<br>
"service" => "[ dhcp4 ]"<br>
<br>
Marcin Siodelski<br>
ISC<br>
<br>
On 08.02.2018 15:35, Zayer, Sebastian wrote:<br>
> Hey there,<br>
> <br>
> ?<br>
> <br>
> i?m trying to control the kea server by using the control agent.<br>
> <br>
> ?<br>
> <br>
> I already implemented a web-frontend to the database (mysql) to show all<br>
> the leases and reservations.<br>
> <br>
> Now I?m trying to get the running configuration by requesting the<br>
> control agent.<br>
> <br>
> ?<br>
> <br>
> $msg = array("command" => "config-get", "service" => "[ dhcp4 ]");<br>
> <br>
> $message = json_encode($msg);<br>
> <br>
> ?<br>
> <br>
> //$message = '{ "command": "config-get", "service": "dhcp4" }';<br>
> <br>
> $len = strlen($message);<br>
> <br>
> ?<br>
> <br>
> echo print_r($message, true), "\n";<br>
> <br>
> ?<br>
> <br>
> $ch = curl_init('<a href="http://127.0.0.1:8080/">http://127.0.0.1:8080/</a>');<br>
> <br>
> curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");<br>
> <br>
> curl_setopt($ch, CURLOPT_POSTFIELDS, $message);<br>
> <br>
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br>
> <br>
> curl_setopt($ch, CURLOPT_HTTPHEADER, array(<br>
> <br>
> ???? 'Content-type: application/json',<br>
> <br>
> ???? 'Content-Length: '. $len)<br>
> <br>
> );<br>
> <br>
> curl_setopt($ch, CURLOPT_TIMEOUT, 10);<br>
> <br>
> curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);<br>
> <br>
> ?<br>
> <br>
> $ret = curl_exec($ch);<br>
> <br>
> if($ret === false)<br>
> <br>
> {<br>
> <br>
> ??? echo 'Curl error: ' . curl_error($ch);<br>
> <br>
> }<br>
> <br>
> else<br>
> <br>
> {<br>
> <br>
> ???? echo print_r($ret, true);<br>
> <br>
> ??? echo 'Operation completed without any errors';<br>
> <br>
> }<br>
> <br>
> ?<br>
> <br>
> All I receive is the following:<br>
> <br>
> {"command":"config-get","service":"[ dhcp4 ]"}<br>
> <br>
> { "result": 400, "text": "Bad Request" }<br>
> <br>
> Operation completed without any errors<br>
> <br>
> ?<br>
> <br>
> ?<br>
> <br>
> I tried a lot of things:<br>
> <br>
> -?????? dhcp4 with or without brackets<br>
> <br>
> -?????? using the documented string<br>
> (<a href="http://kea.isc.org/docs/kea-guide.html#ctrl-channel-client">http://kea.isc.org/docs/kea-guide.html#ctrl-channel-client</a>)<br>
> <br>
> -?????? with and without timeouts<br>
> <br>
> -?????? different HTTPHEADER (with, and without Content-Length like in<br>
> the documentation)<br>
> <br>
> ?<br>
> <br>
> The service is up and running, if i?m using the shell and curl the<br>
> example works.<br>
> <br>
> I also tried to get a clue by reading the log (DEBUG, Level 99) but<br>
> there is just a lousy message ?HTTP_DATA_RECEIVED received 152 bytes<br>
> from 127.0.0.1? and ?DEBUG [kea-ctrl-agent.http] HTTP_RESPONSE_SEND<br>
> sending HTTP response HTTP/1.1 400 Bad Request#015#012 to?*127.0.0.1*?<br>
> <br>
> ?<br>
> <br>
> Does anybody have a clue how to successfully connect and receive a<br>
> proper message?<br>
> <br>
> ?<br>
> <br>
> ?<br>
> <br>
> Thanks in advance<br>
> <br>
> ?<br>
> <br>
> Sebastian<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Kea-users mailing list<br>
> Kea-users@lists.isc.org<br>
> <a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
> <br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 9 Feb 2018 08:54:04 +0100<br>
From: "Evren Yilmaz" <evy@stagbaar.ch><br>
To: <kea-users@lists.isc.org><br>
Subject: [Kea-users] Support Request<br>
Message-ID: <001201d3a17b$27a80b10$76f82130$@stagbaar.ch><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi Guys, <br>
<br>
<br>
<br>
After some testing time I installed Kea 1.2 and it runs on Debian 8. We<br>
ordered the forensic hook and I got a Zip File -> but I dont have any Idea<br>
how to install it. Also not found a documentation about this.<br>
<br>
And my second Question: Is There also a guide how to upgrade from 1.2 to 1.3<br>
without losing lease informations from Database? Also not found anything.<br>
<br>
<br>
<br>
Sorry Im really newbie with KEA and needs someone who have little bit more<br>
experience. <br>
<br>
<br>
<br>
<br>
<br>
Freundliche Gr?sse<br>
<br>
<br>
<br>
Evren Yilmaz<br>
<br>
System Engineer<br>
<br>
<br>
<br>
Bestens bedient, bestens vernetzt<br>
<br>
<br>
<br>
STADTANTENNEN AG<br>
<br>
Bachweid 20<br>
6340 Baar<br>
<br>
Tel Zen.: +41 41 766 70 70<br>
<br>
Tel direkt: +41 41 766 70 89<br>
<br>
Fax: +41 41 766 70 76<br>
<br>
E-Mail: <<a href="mailto:e.yilmaz@databaar.ch">mailto:e.yilmaz@databaar.ch</a>> e.yilmaz@databaar.ch<br>
<br>
<<a href="http://www.stagbaar.ch/">http://www.stagbaar.ch/</a>> <a href="http://www.stagbaar.ch">
www.stagbaar.ch</a><br>
<br>
<<a href="http://www.databaar.ch/">http://www.databaar.ch/</a>> <a href="http://www.databaar.ch">
www.databaar.ch</a><br>
<br>
<br>
<br>
<<a href="https://www.facebook.com/Databaar-1167042370091761/">https://www.facebook.com/Databaar-1167042370091761/</a>><br>
<<a href="https://www.instagram.com/databaar_official/">https://www.instagram.com/databaar_official/</a>>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.isc.org/pipermail/kea-users/attachments/20180209/84af5607/attachment.html">https://lists.isc.org/pipermail/kea-users/attachments/20180209/84af5607/attachment.html</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image001.png<br>
Type: image/png<br>
Size: 8595 bytes<br>
Desc: not available<br>
URL: <<a href="https://lists.isc.org/pipermail/kea-users/attachments/20180209/84af5607/attachment.png">https://lists.isc.org/pipermail/kea-users/attachments/20180209/84af5607/attachment.png</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image002.jpg<br>
Type: image/jpeg<br>
Size: 15204 bytes<br>
Desc: not available<br>
URL: <<a href="https://lists.isc.org/pipermail/kea-users/attachments/20180209/84af5607/attachment.jpg">https://lists.isc.org/pipermail/kea-users/attachments/20180209/84af5607/attachment.jpg</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image003.jpg<br>
Type: image/jpeg<br>
Size: 14776 bytes<br>
Desc: not available<br>
URL: <<a href="https://lists.isc.org/pipermail/kea-users/attachments/20180209/84af5607/attachment-0001.jpg">https://lists.isc.org/pipermail/kea-users/attachments/20180209/84af5607/attachment-0001.jpg</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Kea-users mailing list<br>
Kea-users@lists.isc.org<br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Kea-users Digest, Vol 44, Issue 6<br>
****************************************<br>
</div>
</span></font></div>
</body>
</html>