Installing PECL extensions
The following are the steps required to install most PECL extensions on the (gs) Grid-Service. You can find a list of PECL extensions at http://pecl.php.net/packages.php.
- Create the following directories on your service:
mkdir /home/#####/data/lib mkdir /home/#####/data/lib/php/ - Run the command to download and decompress the package, and also navigate within the directory of the package:
NOTE:
Replace "uploadprogress" with the package you wish to install.
wget http://pecl.php.net/get/uploadprogress && tar zxvf uploadprogress && cd uploadprogress-* && phpize5 - Run the following command to configure the extension:
NOTE:
You may need to replace /php-5.2.5-1/ with the version of PHP you wish to use within the /usr/local directory. A good rule of thumb is to create a PHPinfo page on your domain to see which version you are currently using. You can configure a PECL extension to use only one version of PHP on your account at a time. If you need to change this you will need to re-run the ./configure command using the appropriate path. After configuring please run the command "make clean" before following the next steps below.
./configure --with-php-config=/usr/local/php-5.2.6-1/bin/php-config - Run the following command to compile the extension and copy it to the following folder:
make && cp modules/*.so /home/#####/data/lib/php - Next you need to edit your php.ini file to load your PECL extension correctly. Here is an example:
NOTE:
Replace "uploadprogress" with the package you wish to install.
extension_dir=/home/#####/data/lib/php/ extension = uploadprogress.so - Once you save the changes to your php.ini file, the PECL extension should work. You can verify this by looking at your phpinfo page:
Notes/Supplemental Resources:
- http://pecl.php.net/packages.php
- http://us3.php.net/manual/en/install.pecl.php
- How can I create a phpinfo.php page
- How can I edit php.ini on the (gs) Grid-Service
Revisions:
07-27-2009: Updated wget command for new version of uploadprogress
06-24-2009: Article Creation
Fields marked with an asterisk(*) are required. Comment on this article