This pages contains instructions on how to install Plop on your machine. There are several ways to achieve that. Each method is described below.
Note
We recommend using the PHAR installation method or the composer installation method, depending on whether your project already uses Composer or not.
A PHAR archive is simply a way of bundling all the necessary files in one big file.
Installing Plop as a PHAR archive only involves a few steps:
Make sure your installation fulfills all of the prerequisites.
Note
As all of Plop’s PHAR archives (core and modules) are digitally signed, you must make sure the OpenSSL extension is enabled on your PHP installation. Failure to do so will result in an error when trying to run Plop’s PHAR archive.
Download the PHAR archive for Plop. You can grab the latest version from https://pear.erebot.net/get/Plop-latest.phar. You MUST also download the public signature for the archive. The signature for the latest version is available at https://pear.erebot.net/get/Plop-latest.phar.pubkey.
Note
The whole installation process using PHAR archives can be automated using the following commands:
$ wget https://packages.erebot.net/get/Plop-latest.phar \
https://packages.erebot.net/get/Plop-latest.phar.pubkey
Warning
Even though the command above should work on most installations, a few known problems may occur due to incompatibilities with certain PHP features and extensions. To avoid such issues, it is usually a good idea to check the following items:
Make sure detect_unicode is set to Off in your php.ini. This is especially important on MacOS where this setting tends to be set to On for a default PHP installation.
If you applied the Suhosin security patch to your PHP installation, make sure phar is listed in your php.ini under the suhosin.executor.include.whitelist directive.
Please be aware of certain incompatibilities between the Phar extension and the ionCube Loader extension. To use Plop from a PHAR archive, you will need to remove the following line from your php.ini:
zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so
(the path and versions may be different for your installation).
Check that the installation was successful by running the following command:
$ php -f Plop-latest.phar
(replace Plop-latest.phar with the actual name of the PHAR archive you just downloaded in case it was different)
The command should return without any error. If error messages are issued, try to fix your installation using the information given by those messages.
You may now proceed to the next step, which makes actual use of Plop’s logging capabilities.
Composer is a simple dependency resolver / package manager aimed at PHP 5.3.0 or later. Their website contains extensive documentation on how to use it in your project to handle dependencies.
With that in mind, using composer to install Plop is very simple and only involves the following steps:
Install Composer on your machine:
me@home:~$ curl -s http://getcomposer.org/installer | php
Create a file named composer.json in your current directory.
Copy/paste the following snippet in that file and save:
{
"require": {
"Erebot/Plop": "*"
}
}
Let composer do the rest:
me@home:~$ php composer.phar install
You may now proceed to the next step, which makes actual use of Plop’s logging capabilities.
First, make sure a git client is installed on your machine. Under Linux, from a root shell, run the command that most closely matches the tools provided by your distribution:
# For apt-based distributions such as Debian or Ubuntu
$ apt-get install git
# For yum-based distributions such as Fedora / RHEL (RedHat)
$ yum install git
# For urpmi-based distributions such as MES (Mandriva)
$ urpmi git
Note
Windows users may be interested in installing Git for Windows to get an equivalent git client. Also, make sure that git is present on your account’s PATH. If not, you’ll have to replace git by the full path to git.exe on every invocation (e.g. “C:Program FilesGitbingit.exe” clone ...)
Also, make sure you have all the required dependencies installed as well. Now, retrieve Plop’s code from its repository, using the following command:
$ git clone --recursive git://github.com/Erebot/Plop.git
You may now proceed to the next step, which makes actual use of Plop’s logging capabilities.