How do I install an extension from PECL on Zend Server?



The PHP application requires an extension that is not available in the default Zend Server installation.  The extension is available in the PECL repository.


Zend Server



  1. Use the `pecl` executable provided with the Zend Server installation to verify that the extension is available. For these examples, we will work with the AMQP module.

    # /usr/local/zend/bin/pecl search amqp

  2. Install the module.  Review the last few lines for any post-installation instructions. One such example is displayed after this installation.

    # /usr/local/zend/bin/pecl install amqp
    You should add "" to php.ini

  3. Follow the post-installation instructions

    # vim /usr/local/zend/etc/php.ini
    <add "" in the "Dynamic Extensions" section>

  4. Verify that the php.ini change has taken effect

    # /usr/local/zend/bin/php --info | grep amqp
    amqp.auto_ack => 0 => 0
    amqp.connect_timeout => 0 => 0 => localhost => localhost
    amqp.login => guest => guest
    amqp.password => guest => guest
    amqp.port => 5672 => 5672
    amqp.prefetch_count => 3 => 3
    amqp.read_timeout => 0 => 0
    amqp.timeout => no value => no value
    amqp.vhost => / => /
    amqp.write_timeout => 0 => 0

  5. If the modules loaded as expected, restart Zend Server.

    # /usr/local/zend/bin/ restart


The commands outlined above are all run as the user "root".  The search command does not explicitly require root privileges, though installation does.

More pecl functionality is available by using the command `pecl help`.

Once installed, the extension will show up in the Zend Server UI under Configurations > PHP.

Zend does not support the extensions provided by PECL.  The inclusion of the pecl command is for the convenience of the administrator.