Installing Flyspray on a linux server

To run on a LAMP box.

Login via ssh, su root then...

cd /usr/share
mv flyspray-0.9.9.stable20090912 flyspray

Create a database for flyspray to use.


Create a link in apache to access the flyspray code

nano /etc/httpd/conf.d/flyspray.conf
#  Bugtracker

<Directory "/usr/share/flyspray">
  Order Deny,Allow
  Allow from all

Alias /bugs /usr/share/flyspray

Restart apache

/etc/init.d/httpd restart

We need to make some modifcations to allow separate databases for different sites.


The intention is to create a flyspray.conf.php in the folder below the public html folder.


First you need to edit include/

comment out the line begining "$conf = "

and add in its place

$conf_file = substr($dr,0,strrpos($dr,"/"))."/flyspray.conf.php";
$conf =  @parse_ini_file($conf_file,true);


Next we want to teach flysprays setup to use that file too.

Edit /setup/index.php

Beneath the first comment block (ie about line 9) add

// check for pre-existing config file
$conf_file = (substr($dr,0,strrpos($dr,"/")))."/flyspray.conf.php";
if (!file_exists($conf_file)) die("bug tracker not enabled for this site: $conf_file");

Further down you need to change the first few lines of function CheckWriteability:

  function CheckWriteability($path)
      global $conf_file;
      // Get the full path to the file
//      $file = APPLICATION_PATH ."/" . $path;
      $file = $conf_file;
      // In case it is flyspray.conf.php, the file does not exist
      // so we cant tell that it is writeable. So we attempt to create an empty one
//      if ($path == "flyspray.conf.php") {
//        $fp = @fopen($file, "wb");
//        @fclose($fp);
//      }


 Then in function  ProcessAdminConfig add "global $config_file;" at the start:

   function ProcessAdminConfig($data)
      global $conf_file;
      // Extract the varibales to local namespace


then through the rest of the function replace "../flyspray.conf.php" with $config_file


To prevent automatic redirection to the setup file change the start of /usr/share/flyspray/index.php...













On-line Code Manual