From d0ae594885701be0d39de51b17c65ccfbf4263bf Mon Sep 17 00:00:00 2001
From: Michal Novotny
- PHP: Radek Hladik develops
- PHP bindings.
+ PHP: Radek Hladik started developing
+ PHP bindings in 2010.
- The php-libvirt bindings also have their source online
- here in Github.
+ In February 2011 the binding development has been moved to the
+ libvirt.org as libvirt-php project.
- This allows you to easily see the code, make comments on it,
- create your own forks, and contribute the changes back.
+ The project is now maintained by Michal Novotny and it's heavily based
+ on Radek's version. For more information including the information on posting
+ the patches you to libvirt-php please refer to PHP binding page.
The libvirt-php, originally called php-libvirt, is the PHP API bindings for
+ the libvirt virtualization toolkit originally developed by Radek Hladik but
+ currently maintained by Red Hat. The PHP bindings code source is now maintained in a git repository available on
+libvirt.org:
+
+It can also be browsed at
+ The code is using autotools to generate the files necessary for compilation. The preferred way of building is
+ to run autogen.sh to generate configure script and then go on with the standard linux make commands, i.e. Before you start using the module you have to install the module first. The module
+php_libvirt.so is being generated when you compile it. This is necessary to be loaded
+in the extensions sections of php.ini file for PHP version older than PHP-5.
+Starting with PHP-5 you can create a file called libvirt.ini in /etc/php.d having just
+one line
+If you're using PHP as a module (mod_php5.so) in the Apache webserver you need to
+restart your Apache to trigger configuration reload for PHP.
+
+If you're not sure that you have everything set up right and you don't want to restart
+your Apache webserver before you're sure everything will be working fine you could try
+running the test using cli-based PHP interpreter. There are some example scripts coming
+along the source codes in the
+When you're having some issues with the connection make sure the apache user is having
+access to libvirt. For more information please see Libvirt access control page.
+
+If you would like to contribute to the libvirt-php project you could write patches for it but please
+make sure you're following the procedure below:
+
+PHP API bindings
+
+Presentation
+ Getting the source
+
+git clone git://libvirt.org/libvirt-php.git
+
+
+http://libvirt.org/git/?p=libvirt-php.git;a=summary
+
+
+
+Building
+
+$ cd libvirt-php
+$ ./autogen.sh
+$ make
+
+
+
+Enabling the module in PHP
+extension=php_libvirt.so
to enable the extension. Of course, you
+need to have this module copied in the directory with the rest of your PHP modules to
+make PHP find the module for you.example
subdirectory so you can try to run
+php on the index.php script to check whether it's working fine to establish connection or not.
+Contribution
+
+
+
+When you send the patch you're patch will be reviewed and later committed to the libvirt-php repository. You'll be contacted in case some flaws are found during the review.
+
+git clone git://libvirt.org/libvirt-php
+ git config --local format.subjectprefix "libvirt-php"
+ git format-patch -X
where X is the number of patch parts to be posted, for multipart patch (X is greater than 1) please use also numbering (-n) option and include the cover-letter (--cover-letter).git send-email <files> --to libvir-list@redhat.com
command where <files> can be 000* to send all the patches formatted by git format-patch since git format-patch names the files starting with the 4 digit numbers.