Manually Installing the extension

For extension developers and people interested in the latest bugfixes, you can compile the driver from the latest source code on » Github. Run the following commands to clone and build the project:

$ git clone
$ cd php-rdkafka
$ phpize
$ ./configure
$ make all -j 5
$ sudo make install

The last step will report where has been installed, similar to:

Installing shared extensions:     /usr/lib/php/extensions/debug-non-zts-20151012/

Ensure that the extension_dir option in php.ini points to the directory where was installed. You can query the option by running:

$ php -i | grep extension_dir
  extension_dir => /usr/lib/php/extensions/debug-non-zts-20151012 =>

If the directories differ, either change extension_dir in php.ini or manually move to the correct directory.

Add the following line to your php.ini file: