| | |
| | |
| | h2. Server requirements |
| | * Apache 1.3 or higher |
| | * PHP 4.x or higher (said to have worked on PHP5, but not tested so beware) |
| | * MySQL 4.0 or higher |
| | |
| | h2. Python and Sentry Requirements |
| | {include:Sentry 2 Setup} |
| | |
| | h2. Check out the code |
| | {code} |
| | svn co https://svn.osuosl.org/public/bouncer/trunk . |
| | {code} |
| | |
| | If you are checking out a particular snapshot, check it out from tags/ or branches/ instead of trunk. |
| | |
| | h2. Set up the database |
| | {code} |
| | mysql -u user -D db -h host.foo.com -p < ./sql/bouncer.sql |
| | {code} |
| | |
| | h2. Apache configuration |
| | * Python must have a handler in Apache for loader.py -- usually run as a CGI script. |
| | * Typically ./php is the webroot for the vhost, and ./python is accessed through an alias. |
| | * Since Python files are .conf, you should disallow access to *.conf for Bouncer's vhost. |
| | |
| | h2. PHP setup |
| | h3. Setting up config.php |
| | In the ./php/cfg/ directory, you'll find config-dist.php. Copy this to config.php. |
| | {code} |
| | cp php/cfg/config-dist.php php/cfg/config.php |
| | {code} |
| | |
| | The config.php document has comments in it that explain what each item is for. Let's take a look: |
| | {code} |
| | define('FILEPATH','/var/www/download'); // filepath of root dir |
| | define('WEBPATH',''); // web path of root dir |
| | define('LIB',FILEPATH.'/lib'); // path to lib dir |
| | define('INC',FILEPATH.'/inc'); // path to inc dir |
| | define('HEADER',INC.'/header.php'); // header document |
| | define('FOOTER',INC.'/footer.php'); // footer document |
| | define('DBHOST', ''); // db host |
| | define('DBNAME', ''); // db name |
| | define('DBUSER', ''); // db user |
| | define('DBPASS', ''); // db pass |
| | define('LOGGING',1); // enable logging? 1=on 0=off |
| | {code} |
| | |
| | * FILEPATH - this is the root of the php side of things |
| | * WEBPATH - this is the relative path for the application. If your application was foo.com/bar/ then your WEBPATH would be "/bar". |
| | * DB* - database config stuff, the usual |
| | * LOGGING - this determines whether or not you want to update download counts when people get bounced with the bounce script or the download form. If you turn this off, the only way you'll be able to track hits is by munging apache logs. By default this is turned on, because it's a relatively cheap hit on the DB. |
| | |
| | h3. Displaying errors when you first start out |
| | PHP doesn't need any specific configuration on the server end of things. Keep in mind that by default PHP typically has display_errors and error_reporting dumbed down. You might want to turn these on when setting up the admin interface for the first time to catch configuration problems: |
| | {code} |
| | ini_set('display_errors',1); |
| | ini_set('error_reporting',E_ALL); |
| | {code} |
| | |
| | h2. Sentry setup |
| | {include:Running Sentry 2} |
| | |
| | h2. Loader setup |
| | | {include:Loader Setup} |