Custom php library with local pear installation

Hello, I want to be able to deploy a PHP web application along with a local PEAR installation.

To be more specific, I am trying to find a way to do a โ€œper-applicationโ€ or a local PEAR installation, if possible.

For instance:

The MyApplication application is located at: / var / www / applications / myapplication

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

I am looking for a way to install PEAR for each application, since not all applications are managed by me (and I want to control which PEAR packages are installed and when).

I found several manuals for installing PEAR locally (on a shared host), but I don't know if my script is suitable for installing PEAR locally.

Any thoughts / help appreciated.

+3
source share
1 answer

We use this approach for our deployments.

For each deployed application, we create the externals / pear directory through:

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

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

We have used this approach for several years with great success.

+6
source

Source: https://habr.com/ru/post/1748394/


All Articles