~$ sudo apt-get

Install PHP Modules via PECL

by on Jan.13, 2010, under Apache, PHP

First, mount the /tmp partition with exec permissions.

mount -o remount,exec /tmp

To install a package via pecl, run the following.

pecl install ssh2
(If the package is in a state other than stable, append the state after the package name ‘pecl install ssh2-beta’)

Last few lines of the module install will list the location of the library, usually /usr/lib/php/modules. Create a ini file with the module name within /etc/php.d/ with the extension directive.

# cat /etc/php.d/gd.ini
; Enable gd extension module

At this point, run the mount command to reestablish noexec for the /tmp partition.

mount -o remount,noexec /tmp

Gracefully restart apache and you are done.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...