Difference between revisions of "Mod Murmur"

From Mumble Wiki
Jump to: navigation, search
(Undo revision 5867 by PCGod (Talk) - Noted security issue and just because it isn't supported doesn't make it forbidden.)
(Removed coping over the database.)
Line 27: Line 27:
 
$whatname = "MyServer";<br/>
 
$whatname = "MyServer";<br/>
 
$dbhost = "/path/to/murmur"; // This is the path where it will look for the murmur.sqlite db!<br/>
 
$dbhost = "/path/to/murmur"; // This is the path where it will look for the murmur.sqlite db!<br/>
</blockquote>
 
'''How to host the viewer on a different server than murmur is running on ...'''<br/>
 
The script and architecture of SQLite DBs expect normally that the webpage with the Mod_Murmur viewer is hosted on the same machine as the Murmur server. That is because it needs to access the local SQLite DB (murmur.sqlite).<br/>
 
You still can access Murmur SQLite DBs remotely, using a simple trick:<br/>
 
Download the murmur.sqlite first, then access this local copy. All you need to do is add this line to mod_murmur.php:<br/>
 
<blockquote>
 
copy("http: // www .url.to/murmur-static_x86-1.2.3/murmur.sqlite","murmur.sqlite");<br/>
 
</blockquote>
 
So, in your mod_murmur.php:<br/>
 
<blockquote>
 
...<br/>
 
copy("http://www.url.to/murmur-static_x86-1.2.3/murmur.sqlite","murmur.sqlite");<br/>
 
$dbhandle = new SQLite3('murmur.sqlite');<br/>
 
...<br/>
 
</blockquote>
 
This will locally copy the sqlite db so your viewer can access it. Keep an eye on the path to the DB ($dbhost) settings ... the path should point to the directory where you downloaded the murmur.sqlite to. Leave it blank as a first guess ...<br/>
 
Also you understand that this method is requiring that the murmur.sqlite is accessible via web (http) ... if the murmur hosting machine is not configured like that this workaround won't work.
 
 
</blockquote>
 
</blockquote>
  
 
'''For Security reasons''' - make sure your Mumble database is in a directory that cannot be downloaded from.  For example put the murmur server in "/home/<username>/murmur" and the mod_murmur script in "/home/<username>/website.com/mod_murmur.php" where the database can't be downloaded.
 
'''For Security reasons''' - make sure your Mumble database is in a directory that cannot be downloaded from.  For example put the murmur server in "/home/<username>/murmur" and the mod_murmur script in "/home/<username>/website.com/mod_murmur.php" where the database can't be downloaded.

Revision as of 17:34, 25 July 2011

Before starting this how-to-setup-a-channel-viewer, a few definitions are required. First Mumble is split into two parts, the client side app called "Mumble" and the server side binary called "Murmur" which the client side apps log into. A "Channel Viewer" is any code that runs separate from Murmur and allows a user to view who is currently logged into the murmur server. Most channel viewers are used on websites and take the form of PHP, perl, javascript or various other web code.

Introduction

There are two ways to setup a channel viewer for Murmur, one is officially supported and the other is not.

  • ICE - The officially supported method is by using "ICE" or the "Internet Communication Engine", a third-party PHP library built by ZeroC. Almost all the channel viewer applications, except for one, currently use the ICE protocol. Using ICE requires a setup like this:
    Figure 1. Communication method for Murmur
    • Unfortunately using ICE complicates things. Mumble works best on servers that are connected via Mbit connections not your home DSL line. Most Mbit connected servers are commercial and that means the admin doesn't likely have root access to install ZeroC's ICE (see Note One). Even if the admin can install ICE, most smart server admins would not because of security and upgrade issues. It is much better to leave as much of a production web server untouched and under the control of your host as possible (See Note Two)
      • Note One - PHP 5.3 does have the ability to add modules without root access using a "phprc" file, however, ICE relies on other libraries, like the mcpp which is also not installed on most webhosts.
      • Note Two - This doesn't apply for commercial hosts of Mumble who run whole servers dedicated to just Mumble hosting. And ICE can be used to administrate a Mumble server.
  • Direct - The other method is to directly access the log file and SQLite3 database that Murmur uses.
    • Although not officially supported, this is the simplest method because all it requires is one PHP script running on the same server as Mumble. Because the Murmur database file is in SQLite3 format, this method still requires the SQLite3 PHP library, but it is commonly found standard on most web hosts like Dreamhost running PHP 5.3.

Use ICE

  • First install ICE which requires a bunch of dependencies, root SSH access to your webhost, maintence, etc.
  • Install one of the multiple channel viewers built for ICE - one of the best is MumPI
  • Then install a channel viewer

Or the Direct Method

  • First check to see if your server has the SQLite3 PHP library installed. You can do this by putting a <?php phpinfo() ?> in a file and loading it on the server and searching for "SQLite3".
    • If so, you are golden, if not, see if your host can install it.
  • Get the " Mod_murmur.php" PHP script and if you are like most, you will want to setup a stand alone install and the instructions below are copied from here:

Then you only need the mod_murmur.php file (unzip the .zip). Edit it and replace this manually (note the ending slashes!):

$whatpath = "http://path.to/unzippedimages/";
$whatname = "MyServer";
$dbhost = "/path/to/murmur"; // This is the path where it will look for the murmur.sqlite db!

For Security reasons - make sure your Mumble database is in a directory that cannot be downloaded from. For example put the murmur server in "/home/<username>/murmur" and the mod_murmur script in "/home/<username>/website.com/mod_murmur.php" where the database can't be downloaded.