The easy way
Download, unzip, ready. Easy as that!
With a bit more forethought put into it
Even if the 'raw' installation process is as simple as described above,
it will pay off to do some planning of where in the file system hierarchy
you put the files. From my experience there are roughly three methods for
deploymoment, where the third one is a combination of the two previous:
This type of deployment puts the library on a 'central' directory on the
server, which everyone can access. On Linux this would typically be
/var/www/pphplib or /usr/local/lib/pphplib, depending on your distribution
The of this installation is, that it is central. Thus you can
update the library and everyone will benefit from the latest bugfixes and
However, this big advantage is again it's biggest disadvantage,
because everyone using the pPHPlib must upgrade. This might not alwasy be
desired, esp for applications using very old versions in the lib which might
The prerequisite for such an installation is that you have
administrator access to the machine.
This would be the typical installation for an ISP (Internet
With this form of the installation you assign every project on your server
its own instance of the pPHPlib. Normally this is done by creating a
subdirectory in the base folder of the project, where the project is
located (e.g. /var/www/myproject/pphplib).
The advantage of such a deployment is, that you can update the
pPHPlib independantly for each project. Undesired side-affects for other
project do not have to be expected.
The disadvantage is, that you might have to update quite some
projects if important bugfixes or security enhancements of the pPHPlib
This kind of installion does not require any special prerequisites,
as you already should have access to your project directory.
This would be the typical installtion for a web development
company working on multiple projects for different customers.
With that installation you would install the pPHPlib either in the home
directory of the user (/home/user/pphplib) or in the project directory which
resides in the home of the user (/home/user/myproject/pphplib). This first
installation is similar to the Shared installation above, the second one is
similar to the Project installation.
Advantages of a per user installation is, that the user has full
control over the installation. Other advantages are dependent on which
kind of installation is chosen (home directory or project)
The disadvantages are, that every user has to upgrade when a new
version comes out. And of course again dependent on the form of installation.
Prerequisites are practically gone, as every user can write in
her home directory.
A typical installtion would be the development server of a web
development company, where sources are located on a central version control
server. But also for your own 'private' projects. And of course also when
you want to deploy on a server where you do not have admin rights.
The 'correct' installation depends very much on your needs. Putting some
fore-thought and planning into it before the physical installation
will pay off in the long run. On the other hand, if you are unsure, pick
one as you can always change it later without too much hassle.