README
------
- StatusNet 0.9.3 ("Half a World Away")
- 29 June 2010
+ StatusNet 0.9.4beta2
+ 11 August 2010
This is the README file for StatusNet, the Open Source microblogging
platform. It includes installation instructions, descriptions of
New this version
================
- This is a minor bug and feature release since version 0.9.2 released on
- 4 May 2010.
+ This is a security, bug and feature release since version 0.9.3 released on
+ 29 June 2010.
For best compatibility with client software and site federation, and a lot of
bug fixes, it is highly recommended that all public sites upgrade to the new
version.
+ Changes from 0.9.4beta1:
+ - fix for daemon config switching on multi-site setup
+
Notable changes this version:
- - Enhanced API output to aid StatusNet-specific clients
+ - OpenID and OAuth libraries patched for potential timing attack
+ - OStatus feed i/o updated for Activity Streams
+ - Correctness fixes on XRD, other discovery bits
+ - Support for contacting SNI-based SSL virtual hosts when SSL
+ certificate verification is enabled (requires PHP 5.3.2+ or
+ enabling CURL backend with $config['http']['curl'] = true)
+ - Experimental SubMirror plugin
+ - Multi-site status_network table mode has been tweaked to support
+ multiple tags better
- Many updates to user interface translation from TranslateWiki
- - OStatus now works subscribing to SSL-protected sites by default
- - OpenID now works on PHP 5.3, supports closer site integration.
- - Numerous API and FOAF output fixes.
- - Fixes to Facebook integration for FB API behavior changes
- - PostgreSQL support updates
- - Initial version of a custom theme uploader (disabled by default)
- - LDAP auth plugins cleanup
- Many other bugfixes
- A full changelog is available at http://status.net/wiki/StatusNet_0.9.3.
+ A full changelog is available at http://status.net/wiki/StatusNet_0.9.4.
Prerequisites
=============
- MySQL. For accessing the database.
- GD. For scaling down avatar images.
- mbstring. For handling Unicode (UTF-8) encoded strings.
- - gettext. For multiple languages. Default on many PHP installs.
For some functionality, you will also need the following extensions:
Sphinx server to serve the search queries.
- bcmath or gmp. For Salmon signatures (part of OStatus). Needed
if you have OStatus configured.
+ - gettext. For multiple languages. Default on many PHP installs;
+ will be emulated if not present.
You will almost definitely get 2-3 times better performance from your
site if you install a PHP bytecode cache/accelerator. Some well-known
1. Unpack the tarball you downloaded on your Web server. Usually a
command like this will work:
- tar zxf statusnet-0.9.2.tar.gz
+ tar zxf statusnet-0.9.4.tar.gz
...which will make a statusnet-0.9.2 subdirectory in your current
directory. (If you don't have shell access on your Web server, you
2. Move the tarball to a directory of your choosing in your Web root
directory. Usually something like this will work:
- mv statusnet-0.9.2 /var/www/statusnet
+ mv statusnet-0.9.4 /var/www/statusnet
This will make your StatusNet instance available in the statusnet path of
your server, like "http://example.net/statusnet". "microblog" or
parameters correctly so that both the SSL server and the
"normal" server can access the session cookie and
preferably other cookies as well.
-shorturllength: Length of URL at which URLs in a message exceeding 140
- characters will be sent to the user's chosen
- shortening service.
+shorturllength: ignored. See 'url' section below.
dupelimit: minimum time allowed for one person to say the same thing
twice. Default 60s. Anything lower is considered a user
or UI error.
'search', 'message', 'settings', 'admin'. Ignored when site
is private, in which case the entire site ('/') is disallowed.
+url
+---
+
+Everybody loves URL shorteners. These are some options for fine-tuning
+how and when the server shortens URLs.
+
+shortener: URL shortening service to use by default. Users can override
+ individually. 'ur1.ca' by default.
+maxlength: If an URL is strictly longer than this limit, it will be
+ shortened. Note that the URL shortener service may return an
+ URL longer than this limit. Defaults to 25. Users can
+ override. If set to 0, all URLs will be shortened.
+maxnoticelength: If a notice is strictly longer than this limit, all
+ URLs in the notice will be shortened. Users can override.
+ -1 means the text limit for notices.
+
Plugins
=======
//exit with 200 response, if this is checking fancy from the installer
if (isset($_REQUEST['p']) && $_REQUEST['p'] == 'check-fancy') { exit; }
- define('STATUSNET_VERSION', '0.9.3');
+ define('STATUSNET_VERSION', '0.9.4beta2');
define('LACONICA_VERSION', STATUSNET_VERSION); // compatibility
- define('STATUSNET_CODENAME', 'Half a World Away');
+ define('STATUSNET_CODENAME', 'Orange Crush');
define('AVATAR_PROFILE_SIZE', 96);
define('AVATAR_STREAM_SIZE', 48);
# global configuration object
require_once('PEAR.php');
+require_once('PEAR/Exception.php');
require_once('DB/DataObject.php');
require_once('DB/DataObject/Cast.php'); # for dates
require_once INSTALLDIR.'/lib/clientexception.php';
require_once INSTALLDIR.'/lib/serverexception.php';
+
+//set PEAR error handling to use regular PHP exceptions
+function PEAR_ErrorToPEAR_Exception($err)
+{
+ //DB_DataObject throws error when an empty set would be returned
+ //That behavior is weird, and not how the rest of StatusNet works.
+ //So just ignore those errors.
+ if ($err->getCode() == DB_DATAOBJECT_ERROR_NODATA) {
+ return;
+ }
+ if ($err->getCode()) {
+ throw new PEAR_Exception($err->getMessage(), $err->getCode());
+ }
+ throw new PEAR_Exception($err->getMessage());
+}
+PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception');
+
try {
StatusNet::init(@$server, @$path, @$conffile);
} catch (NoConfigException $e) {
return true;
}
- $sn = Status_network::staticGet($nickname);
+ $sn = Status_network::staticGet('nickname', $nickname);
if (empty($sn)) {
return false;
throw new Exception("No such site nickname '$nickname'");
{
// Load default plugins
foreach (common_config('plugins', 'default') as $name => $params) {
+ $key = 'disable-' . $name;
+ if (common_config('plugins', $key)) {
+ continue;
+ }
+
if (is_null($params)) {
addPlugin($name);
} else if (is_array($params)) {
}
// Backwards compatibility
-
if (array_key_exists('memcached', $config)) {
if ($config['memcached']['enabled']) {
addPlugin('Memcache', array('servers' => $config['memcached']['server']));
$config['cache']['base'] = $config['memcached']['base'];
}
}
+ if (array_key_exists('xmpp', $config)) {
+ if ($config['xmpp']['enabled']) {
+ addPlugin('xmpp', array(
+ 'server' => $config['xmpp']['server'],
+ 'port' => $config['xmpp']['port'],
+ 'user' => $config['xmpp']['user'],
+ 'resource' => $config['xmpp']['resource'],
+ 'encryption' => $config['xmpp']['encryption'],
+ 'password' => $config['xmpp']['password'],
+ 'host' => $config['xmpp']['host'],
+ 'debug' => $config['xmpp']['debug'],
+ 'public' => $config['xmpp']['public']
+ ));
+ }
+ }
}
}