[libvirt] Update on PHP libvirt

I would like to post some update about PHP bindings for libvirt I started last year. As usual I do not have enough time to work on it however the last version 0.3 seems to be quite stable. I did get some reports from people using it and it seems that the code is working without problems. I will probably change the status from alpha to beta. The code (available at http://phplibvirt.cybersales.cz/ ) implements basic Libvirt functions for readonly access and machine live-cycle management. I should be able to add any other libvirt function but i do not know all the libvirt functions so well. So if you miss some function and you are willing to test it I can implement it. I would appreciate any feedback and suggestions on this code. Radek

On 06/30/2010 12:18 AM, Radek Hladik wrote: <snip>
The code (available at http://phplibvirt.cybersales.cz/ ) implements basic Libvirt functions for readonly access and machine live-cycle management. I should be able to add any other libvirt function but i do not know all the libvirt functions so well. So if you miss some function and you are willing to test it I can implement it.
I would appreciate any feedback and suggestions on this code.
This looks like a very worthwhile effort. Would you be ok with us adding a link from our list? http://libvirt.org/bindings.html I think it would help get more people to test it. :) Regards and best wishes, Justin Clift
Radek
-- Salasaga - Open Source eLearning IDE http://www.salasaga.org

Dne 29.6.2010 17:04, Justin Clift napsal(a):
This looks like a very worthwhile effort.
Would you be ok with us adding a link from our list?
It would be great. Radek

--- docs/bindings.html.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/docs/bindings.html.in b/docs/bindings.html.in index 63cd740..ee63ce3 100644 --- a/docs/bindings.html.in +++ b/docs/bindings.html.in @@ -16,6 +16,7 @@ higher level kind of languages:</p> <li><strong>Ruby</strong>: David Lutterkort provides <a href="http://libvirt.org/ruby/">bindings for Ruby</a>.</li> <li><strong>Java</strong>: Daniel Veillard maintains <a href="java.html">Java bindings</a>.</li> <li><strong>C#</strong>: Jaromír Červenka maintains <a href="http://svn.i-tux.cz/listing.php?repname=SharpLibVirt">C# bindings here</a>.</li> + <li><strong>PHP</strong>: Radek Hladik is developing <a href="http://phplibvirt.cybersales.cz/">PHP bindings</a>.</li> </ul> <p>For information on using libvirt on <strong>Windows</strong> <a href="windows.html">please see the Windows -- 1.7.0.1

On 06/30/2010 07:53 AM, Justin Clift wrote:
--- docs/bindings.html.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/docs/bindings.html.in b/docs/bindings.html.in index 63cd740..ee63ce3 100644 --- a/docs/bindings.html.in +++ b/docs/bindings.html.in @@ -16,6 +16,7 @@ higher level kind of languages:</p> <li><strong>Ruby</strong>: David Lutterkort provides <a href="http://libvirt.org/ruby/">bindings for Ruby</a>.</li> <li><strong>Java</strong>: Daniel Veillard maintains <a href="java.html">Java bindings</a>.</li> <li><strong>C#</strong>: Jaromír Červenka maintains <a href="http://svn.i-tux.cz/listing.php?repname=SharpLibVirt">C# bindings here</a>.</li> + <li><strong>PHP</strong>: Radek Hladik is developing <a href="http://phplibvirt.cybersales.cz/">PHP bindings</a>.</li>
ACK. Pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 07/01/2010 12:07 AM, Eric Blake wrote: <snip>
+<li><strong>PHP</strong>: Radek Hladik is developing<a href="http://phplibvirt.cybersales.cz/">PHP bindings</a>.</li>
ACK. Pushed.
Anyone know how to get the website updated with the latest compiled doc version? Maybe a script on the server I should kick off? Regards and best wishes, Justin Clift -- Salasaga - Open Source eLearning IDE http://www.salasaga.org

On 06/30/2010 09:16 AM, Justin Clift wrote:
On 07/01/2010 12:07 AM, Eric Blake wrote: <snip>
+<li><strong>PHP</strong>: Radek Hladik is developing<a href="http://phplibvirt.cybersales.cz/">PHP bindings</a>.</li>
ACK. Pushed.
Anyone know how to get the website updated with the latest compiled doc version?
It's already there: http://libvirt.org/bindings.html I'm not sure what the time lag is, but it wasn't long. Also, check if you have any stale proxy cache between you and the website. Hmm, just noticed that http://libvirt.org/relatedlinks.html also has a list of bindings, but it is somewhat out of date; it would be better to point this back to bindings.html instead of duplicating the list. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

I'm running Ubuntu 10.04 with php 5.3.2. In order to get the extension to compile I had to apply the attached patch. ~david David King Goshen College ITS davidwk@goshen.edu 574-535-7726 On 06/29/2010 10:18 AM, Radek Hladik wrote:
I would like to post some update about PHP bindings for libvirt I started last year. As usual I do not have enough time to work on it however the last version 0.3 seems to be quite stable. I did get some reports from people using it and it seems that the code is working without problems. I will probably change the status from alpha to beta.
The code (available at http://phplibvirt.cybersales.cz/ ) implements basic Libvirt functions for readonly access and machine live-cycle management. I should be able to add any other libvirt function but i do not know all the libvirt functions so well. So if you miss some function and you are willing to test it I can implement it.
I would appreciate any feedback and suggestions on this code.
Radek
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 06/29/2010 09:27 AM, David W King wrote:
I'm running Ubuntu 10.04 with php 5.3.2. In order to get the extension to compile I had to apply the attached patch.
Could you please resend that patch as a context diff? ed script diffs are practically impossible to apply correctly if anything else has touched the file. Our hacking instructions give more hints on how to generate a worthwhile patch: http://libvirt.org/git/?p=libvirt.git;a=blob;f=HACKING Also, it would help to paste the actual compiler error that you are trying to address with your patch. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Sorry. Here's the diff -urp output. The compiler output is: /root/php-libvirt/libvirt.c:19: error: duplicate ‘static’ David King Goshen College ITS davidwk@goshen.edu 574-535-7726 On 06/29/2010 11:38 AM, Eric Blake wrote:
On 06/29/2010 09:27 AM, David W King wrote:
I'm running Ubuntu 10.04 with php 5.3.2. In order to get the extension to compile I had to apply the attached patch.
Could you please resend that patch as a context diff? ed script diffs are practically impossible to apply correctly if anything else has touched the file.
Our hacking instructions give more hints on how to generate a worthwhile patch: http://libvirt.org/git/?p=libvirt.git;a=blob;f=HACKING
Also, it would help to paste the actual compiler error that you are trying to address with your patch.

Dne 29.6.2010 17:38, Eric Blake napsal(a):
On 06/29/2010 09:27 AM, David W King wrote:
I'm running Ubuntu 10.04 with php 5.3.2. In order to get the extension to compile I had to apply the attached patch.
Could you please resend that patch as a context diff? ed script diffs are practically impossible to apply correctly if anything else has touched the file.
Our hacking instructions give more hints on how to generate a worthwhile patch: http://libvirt.org/git/?p=libvirt.git;a=blob;f=HACKING
Also, it would help to paste the actual compiler error that you are trying to address with your patch.
I did encounter this bug already. Its related to certain PHP version and the compile error is almost self-explaining (the thing almost unbelievable with gcc :-) ) php-libvirt-0.3-alpha/libvirt.c:19: error: duplicate static php-libvirt-0.3-alpha/libvirt.c: In function zm_startup_libvirt I have seen other PHP extensions with this problem. The documentation for writing PHP extensions is not very good and a lot of things are done by macros. So I am guessing that the PHP developers did add the static keyword to the macro... I updated the webpage and I put the version with this correction there. Radek
participants (5)
-
David W King
-
Eric Blake
-
Justin Clift
-
Radek Hladik
-
Radek Hladik