Support / KnowledgeBase

 
Search the KnowledgeBase Search

Installing PECL extensions

  • Applies to: (gs)

  • Difficulty: Medium

  • Time needed: 5 minutes

  • Tools needed: None

 

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.

  1. Create the following directories on your service:

    mkdir /home/#####/data/lib
    mkdir /home/#####/data/lib/php/
    
  2. 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
  3. 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
  4. Run the following command to compile the extension and copy it to the following folder:
     make && cp modules/*.so /home/#####/data/lib/php
  5. 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
    
  6. 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:
    uploadprogress


Notes/Supplemental Resources:


Revisions:

07-27-2009: Updated wget command for new version of uploadprogress
06-24-2009: Article Creation




User Comments

No visitor comments posted. Post a comment

Fields marked with an asterisk(*) are required. Comment on this article

Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue