Wiki

Clone wiki

ppaste / Installation

Installation

The main (only) file of ppaste is ppaste.php, which handles everything. You'll also need a directory where the uploaded/grabed images are saved (default: p).

Quick install

  • Copy/symlink ppaste.php to your htdocs directory.
  • Make a directory called p in the same directory where ppaste.php is.
  • Make sure your webserver has writing permission on p.
  • New in 0.3: Create config.php (see below) and set $PPASTE_IMAGE_LIB_PATH to your copy of the PhpThumb Libray.

That's all.

Requirements

  • PHP 5
  • PHP Flags:
    • allow_url_fopen set to On
  • PhpThumb Libray (optional, but without image recoding ppaste might be insecure)

Customize

To customize ppaste, create a file called config.php in the same directory as ppaste.php. There you can override the ppaste configuration. See Configuration.

config.php Example:

<?php
    if(@$PPASTE)
    {
        $PPASTE_IMAGE_LIB_PATH = '/path/to/phpthumb/ThumbLib.inc.php';
        $PPASTE_PICTURE_DIR = '/var/ppaste/';
        $PPASTE_CODE_LENGTH = 16;
    }
?>

Stylesheets

Create a file called ppaste.css in the same directory as ppaste.php and put your CSS code in there. Or use one of the provided styles by symlinking/coping the styles in the styles directory.

Updated