/*****************************************************************************\

                Y e t    A n o t h e r    N o p a s t e

                            Installation Guide

\*****************************************************************************/

-I- Requirements
----------------

- HTTP Server
- php5.
- php xdiff module

Successfully tested on Debian SID Apache 2 php5


-II- Install
------------

-1- Uncompress the delivery content in a directory accessible by your http
    server
    Exemple:
        cd /var/www
        tar -zxf yanopaste-1.1.0.tar.gz
        ln -s yanopaste-1.1.0 yanopaste

-2- Copy config.php.sample file to config.php. Edit the config.php file to
    change the default configuration. See config.php file for more information.

-3- Make sure that the user running your http server have sufficient privileges
    to write into the "repository" directory you've configured in the
    config.php
    Exemple: Supposing you've configured your repository to /var/lib/yanopaste
        cd /var/lib/yanopaste
        chown root:www-data .
        chmod g+w .

-4- Point your browser to the path where you've installed yanopaste
    Exemple:
        http://www.example.com/yanopaste

-5- Use it :)

-III- Upgrade
-------------
-0- Backup your paste repository and your config.php file
-1- Copy new files in your installation directory
-2- Compare your existing config.php file with the provided config.php.sample
    file. Usualy, "diff -u config.php.sample config.php" does the job.
-3- Point your browser to:
        http://www.example.com/yanopaste/upgrade.php
-4- Make some tests.
-4.1- If tests fails, raise a bug in http://bugzilla.jujunie.com.
-4.2- If tests ok, it's done, you can remove the upgrade.php file.

-IV- Security considerations
-----------------------------

Pasted content can now be protected using a password. Yanopaste is then
checking the password before giving access to the content.
Of course, the directory where Yanopaste is storing content must not
be directly accessible!
You have then 2 options

-1- Option 1: the directory is originally in the publication web server scope,
    like /var/www/yanopaste/repository You can change your apache configuration
    either using a .htaccess file, eithier using a Directory directive in your
    main apache configuration with something like this:
    <Directory /var/www/yanopaste/repository>
     order deny,allow
     deny from all
    </Directory>
-2- Option 2: you've define a directory which is not in the publication server
    scope: your fine :)


-V- Bug / Enhancement reporting
---------------------------------

http://bugzilla.jujunie.com


-VI- Licence
------------

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.


-VII- Troubleshooting
--------------------

-1- How to install xdiff for PHP?
The good start point is the PHP manual...
Here is the list of things I've done, hoping it helps
 o sudo apt-get install php5-dev php-pear
 o wget http://www.xmailserver.org/libxdiff-0.23.tar.gz
 o tar -zxf libxdiff-0.23.tar.gz
 o cd libxdiff-0.23
 o sudo ./configure
 o sudo make
 o sudo make install
 o It installed libxdiff.so in /usr/local/lib. Therefore, you may check that
 directory is present in your /etc/ld.so.conf file. If not, add it and execute
 ldconfig
 o sudo pecl install xdiff
  - If it fails, try: sudo pecl install xdiff-beta
 o Editing /etc/php/apache2/php.ini to add the extension
 o Restart Apache
