Skip to content

kaichuang1992/filetrader

Repository files navigation

-- File Trader --
The following base components are required. See REQUIREMENTS for a list of 
external PHP and JavaScript libraries required for FileTrader.

- PHP 5.3.x
- mod_xsendfile (and enabled in the dir/vhost configuration)
- CouchDB
- PHP With PEAR	(see below)
	HTTP_Download 1.1.4
- 64 bit system for >2G file uploads

--- Configure ---
Copy config.php.defaults to config.php and modify if needed.

Make sure the database exists in CouchDB. It doesn't need to contain
any documents though. You can use the web based CouchDB 
interface at "http://localhost:<PORT>/_utils" or use CURL:

$ curl -X PUT http://127.0.0.1:5984/filetrader

See the script in the docs/ directory to populate CouchDB with some entries.

Create directories and set file permissions:

# create directories
$ mkdir -p data/files data/cache tpl_c 

# set unix permissions
$ chmod o+w -R data tpl_c

*** WARNING ***
Make sure the data directory is not accessible through the web browser,
use a .htaccess file to limit access to directory structure!

	echo "Deny from all" > data/.htaccess

Make sure Apache allows the use of "Limit" as override in your (virtual host)
directory:

	AllowOverride Limit

--- SELinux Configuration ---
Set the correct SELinux labels (only for Fedora/Red Hat systems?)

$ chcon -R -t httpd_sys_rw_content_t data tpl_c

Allow HTTP to access the network (to contact CouchDB) and send mail (for the 
invites)

$ su -c 'setsebool -P httpd_can_network_connect on'
$ su -c 'setsebool -P httpd_can_sendmail on'

(The -P flag makes the setting persistent across reboots)

*** WARNING ***
Make sure your PHP "error_reporting" is not configured to development
value, but set it to Production value. There are some issues with the 
CouchDB Sag library and E_STRICT.

; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED

Choose "E_ALL & ~E_DEPRECATED".

About

Automatically exported from code.google.com/p/filetrader

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published