tags:

views:

12

answers:

1

Hello i wish to be able to deploy a PHP web application along with a local installation of PEAR.

To be more specific, i am trying to find a way to do a 'per-application' or local installation of PEAR if this is possible.

For example:

The application 'MyApplication' is located in: /var/www/applications/myapplication

The php library is located in: /var/www/applications/myapplication/library

I am looking for a way to do a per-application installation of PEAR since not all applications are managed by me (and i want to control which PEAR packages are installed and when).

I found some tutorials for a local PEAR installation (on a shared host) but i don't know if my scenario fits the one for a local PEAR installation.

Any thoughts/help appreciated.

+1  A: 

We use this approach for our deployments.

For each deployed app, we create externals/pear directory via:

pear config-create /path/to/app/externals /path/to/app/conf/.pearrc 

Then we reset the include path for PHP to only have the /path/to/app/externals/pear/php directory.

We have been using this approach for a couple of years with great success.

apinstein
Thanks. But how do you manage package installations in each deployed app?
andreas
once you've created the local pear, you can mange it via:pear -c /path/to/app/conf/.pearrc [normal pear command]
apinstein