Wednesday, November 13, 2013

How To :: Install DBus for PHP on Ubuntu

First you need to install pkg-config package.sudo apt-get install pkg-configNow you need to install DBus package. This will manage all background actions needed by the PHP extension.sudo apt-get install dbus libdbus-1-dev libxml2-devNow we can install the PECL DBus extensionsudo pecl install DBus* if you do not have PECL installed click here * if you get an error like "Failed to download pecl/Dbus within preferred state stable, latest release is version 0.1.1, stability 'beta', use ..... install failed" you need to install the version it says it's the last. For example :sudo pecl install DBus-0.1.1add the extension to PHPecho -e "; configuration for php DBus module\nextension=dbus.so"| sudo tee -a /etc/php5/conf.d/dbus.ini
Note:
If you update your PHP VERSION or find error like this :
PHP Warning:  PHP Startup: dbus: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525

Or you find error like this :
Can not load dinamic library... blablablabla

You can resolve with this:
sudo pecl install -f DBus

0 comments:

Post a Comment