prepare for open source server release

This commit is contained in:
Mike Macgirvin 2010-09-21 16:01:19 -07:00
parent 85fbee3aa4
commit db89a1eb44
7 changed files with 112 additions and 18 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ include/jquery-1.4.2.min.js
*.log *.log
*.out *.out
push push
home.html

64
INSTALL
View file

@ -1,38 +1,76 @@
Installation guide
The following notes apply to alpha/beta releases. Some manual installation is Mistpark Installation
required at this time.
This is an early release. Some manual installation is required at this time.
1. Requirements 1. Requirements
- Apache with mod-rewrite enabled and "Options All" so you can use a - Apache with mod-rewrite enabled and "Options All" so you can use a
local .htaccess file local .htaccess file
- PHP > 5.1. The later the better. You'll need 5.3 for full openssl - PHP > 5.1. The later the better. You'll need 5.3 for full openssl
encryption support encryption support
- PHP *command line* access with register_argc_argv set to true in the - PHP *command line* access with register_argc_argv set to true in the
php.ini file php.ini file
- Mysql 5.x - Mysql 5.x
- cron
- ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks
(Windows)
[Dreamhost.com offers all of the necessary hosting features at a [Dreamhost.com offers all of the necessary hosting features at a
reasonable price. If your hosting provider doesn't allow Unix shell access, reasonable price. If your hosting provider doesn't allow Unix shell access,
you might have trouble getting everything to work.] you might have trouble getting everything to work.]
2. Edit htconfig.php and change system settings. Rename to .htconfig.php 2. Put this directory into the root of your web server document area.
3. Import database.sql into your database with mysql command line or via phpmyadmin - If you copy the directory tree to your webserver, make sure
that you also copy .htaccess - as "dot" files are often hidden
and aren't normally copied.
4. Import updates.sql (if it exists) to catch any late-breaking devel changes - To use a subdirectory of your main domain, set the
5. Put this directory into the root of your web server document area.
- To use a subdir of your main site, set the
config variable $a->path to the relative subdir config variable $a->path to the relative subdir
in .htconfig.php - for example to use http://example.com/test - in .htconfig.php - for example to use http://example.com/test -
set $a->path to 'test'. use
$a->path = 'test';
In this case, you cannot use the web installer.
Skip step 3 and proceed to step 4 - especially steps 4a and 4b.
- Everything will work much better if you can dedicate a domain - Everything will work much better if you can dedicate a domain
or subdomain so that you don't require an extra server path. or subdomain so that you don't require an extra server path.
6. Navigate to your site with a web browser and register an account. 3. Visit your website with a web browser and follow the instructions.
7. Set up a cron task to run "php include/poller.php http://my.domain.name" once every 5-10 minutes. 4. *If* the automated installation fails for any reason, check the following:
4a. ".htconfig.php" exists
If not, edit htconfig.php and change system settings. Rename
to .htconfig.php
4b. Database is populated.
If not, import the contents of "database.sql" with phpmyadmin
or mysql command line
5. At this point visit your website again, and register your personal account.
Registration errors should all be recoverable automatically.
If you get any *critical* failure at this point, it generally indicates the
database was not installed correctly. You might wish to move/rename
.htconfig.php to another name and empty (called 'dropping') the database
tables, so that you can start fresh.
6. Set up a cron job or scheduled task to run the poller once every 5-10
minutes to pick up the recent "public" postings of your friends. Example:
cd /base/directory; /path/to/php include/poller.php
Change "/base/directory", and "/path/to/php" as appropriate for your situation.
If you are using a Linux server, run "crontab -e" and add a line like the
one shown, substituting for your unique paths and settings:
*/5 * * * * cd /home/myname/mywebsite; /usr/bin/php include/poller.php
You can generally find the location of PHP by executing "which php". If you
have troubles with this section please contact your hosting provider for
assistance. Mistpark will not work correctly if you cannot perform this step.

25
LICENSE Normal file
View file

@ -0,0 +1,25 @@
* Mistpark
* Copyright (c) 2010, Mike Macgirvin
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Mistpark nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY Mike Macgirvin ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Mike Macgirvin BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

30
README Normal file
View file

@ -0,0 +1,30 @@
Mistpark Server
Version 2.0 alpha
IMPORTANT: Please see the file INSTALL for system requirements.
Mistpark introduces a new generation of social networks. Mistpark Server
allows you to interact with other members of the Mistpark community using
the DFRN (Distributed Friends and Relations Network) protocol. Other networks
(such as Diaspora, OneSocialWeb, status.net, etc.) will be supported in the
future as their products mature and protocol and privacy/rights issues are
resolved between these networks.
It's your network now. If social networking isn't what you thought it would
be, help us to make it better.
A single instance of Mistpark Server supports up to several hundred people
using commodity hosting hardware. Also available from Mistpark Labs is
Mistpark Personal Edition, which supports a single user.
Please see http://dfrn.org for more information on the mistpark/DFRN project.
We will be providing a support site specifically for mistpark at
http://mistpark.com at a future (unspecified) date. We are still
evaluating wiki, forum, and bug-tracking software for use on the project.
At the present time, you may contact the author and raise issues via
the source code repository on github.
Please support mistpark with a donation.

View file

@ -227,7 +227,7 @@ function item_post(&$a) {
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"$notify_type\" \"$post_id\" > notify.out &", proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"$notify_type\" \"$post_id\" &",
array(),$foo)); array(),$foo));
goaway($a->get_baseurl() . "/" . $_POST['return'] ); goaway($a->get_baseurl() . "/" . $_POST['return'] );
@ -317,7 +317,7 @@ function item_content(&$a) {
// send the notification upstream/downstream as the case may be // send the notification upstream/downstream as the case may be
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" > drop.out &", proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" &",
array(), $foo)); array(), $foo));
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);

View file

@ -97,7 +97,7 @@ function like_content(&$a) {
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"like\" \"$post_id\" > notify.out &", proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"like\" \"$post_id\" &",
array(),$foo)); array(),$foo));
return; return;
} }
@ -164,7 +164,7 @@ EOT;
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"like\" \"$post_id\" > notify.out &", proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"like\" \"$post_id\" &",
array(),$foo)); array(),$foo));
return; // NOTREACHED return; // NOTREACHED

View file

@ -70,7 +70,7 @@ function message_post(&$a) {
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
if($post_id) { if($post_id) {
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" > mail.out &", proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" &",
array(),$foo)); array(),$foo));
notice( t('Message sent.') . EOL ); notice( t('Message sent.') . EOL );
} }