Running Savane Locally - howto

"Savane" is the code name for the server software that runs GNU Savannah, among other things.

"Savane" has many parts. This page describes a method to run a locally copy of Savane frontend PHP part on your computer.

"Savane" is an old, delicate beast and is quick to anger. Tread lightly and send questions to (archive:

The following instructions have been tested on Debian 8 (Jessie) and Ubuntu 14.04 LTS running as non-root user. Other configurations might not work (see below for know issues). If you encounter errors, please write to .

Use the instructions below to run the PHP code locally on your computer. The PHP code needs a MySQL with a pre-configured database. Create a local MySQL server:

# Install required packages.
# Use php-mysql for PHP 7.0.
sudo apt-get install -y git php5-cli php5-mysql mysql-client mysql-server \
                        imagemagick autoconf automake gettext make

# Get Savane code.
git clone git://
cd savane

# Run required initialization.

# Start local server.

Once the PHP server is started, you'll see this message:

$ ./
PHP 5.6.30-0+deb8u1 Development Server started at Sun Feb 12 00:17:54 2017
Listening on
Document root is /home/gordon/savane/frontend/php
Press Ctrl-C to quit.

Open a web browser and visit

When you run the server for the first time, you'll see this message:

Hello Savannah Developer!

It seems this is the first time you run the savane PHP code.

Savane need to access a savane mock-up database.

Once you receive it, please edit the following file
(locally on your computer):


Set the hostname, database, username and password,
then reload the website.

Download and import savane_demo dump:

$ wget

## Setup account for your account USERNAME:

$ sudo -i
# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.26-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

## Create a database user.
## Set `USERNAME` and `PASSWORD` to your desired values.

Query OK, 0 rows affected (0.01 sec)

mysql> GRANT ALL ON savane_demo.* TO 'USERNAME'@'localhost';
Query OK, 0 rows affected (0.01 sec)

mysql> quit;

## Return to non-privileged login.

# exit

## Load the demo tables
$ zcat savane_demo-2019-06-11.sql.gz | mysql --user USERNAME -p
Enter password:

Then update the configuration file with your local values (e.g. /home/gordon/savane/local2/etc-savane/savane-dev-db.php above):


Reloading the savannah web page on your local web browser should now 'just work' and display the savannah website (with dummy values).

There is an admin user 'agn' in the demo database, with password '12345'.

Supported PHP versions

Savannah currently requires php version 5.4, 5.5, 5.6 or 7.0. Earlier versions will not work locally (the script requires php -S).

Other environments/distributions

As long as you have PHP 5.4/5.5/5.6 with MySQL, savane should mostly work. If you don't have autoconf/automake/gettext/perl/etc, you can even skip the bootstrap / configure / make steps - the main PHP should still work, but many of the images and icons will be missing.

On Fedora-25, these are the relevant packages:

sudo dnf -y install git automake autoconf gettext make \
                        ImageMagick php-cli php-mysqlnd \
                        community-mysql perl-ExtUtils-MakeMaker

However Fedora25 moved to PHP-7.0, and so the code didn't "just work".

With MySQL 5.7 and later, be sure to exclude ONLY_FULL_GROUP_BY from sql_mode e.g. in my.cnf.

On Trisquel 8, it isn't fully functional: pages like /bugs/?12345 work, pages like /users/agn don't. Use Apache with a configuration like this:

Listen http


  DocumentRoot /var/www/savane/frontend/php

  SetEnv SAVANE_CONF /var/www/etc/savane

  <Directory "/var/www/savane/frontend/php/">
    # PHP conf
    php_admin_flag register_globals off
    php_admin_flag magic_quotes_gpc off
    php_admin_flag file_uploads on

    php_admin_flag allow_url_fopen off
    # See
    # regarding 'disable_functions'.
    php_admin_value disable_functions exec,passthru,popen,shell_exec,system

    DirectoryIndex index.php index.html

  <Files ~ "^(users|us|u|projects|pr|p|file)$">
    SetHandler application/x-httpd-php
  ErrorDocument 404 /404.php

  # Restrict access into include/
  <Directory "/var/www/savane/frontend/php/include/">
    Order Allow,Deny
    Deny from all

  <Location "/register">
    php_admin_value post_max_size 52428800
    php_admin_value upload_max_filesize 52428800

  # Uploads for new project registrations and bug-report attachments.
  # This directory must be writable by 'www-data' user.
  # NOTE: Ensure this directory matches the '$sys_upload_dir' value
  #       in the custom savanne configuration file
  #       ($SAVANE_CONF/.savane.conf.php).
  Alias /submissions_uploads /var/www/var/www/submissions_uploads/
  <Directory "/var/www/var/www/submissions_uploads/">
    Options Indexes
    AllowOverride None

    # Disable script engines
    # Method 1:
    #ForceType application/octet-stream

    # Method 2:
    <IfModule mod_php5.c>
      # Tested with Apache2 + mod-php5
      php_admin_flag engine off
    <IfModule mod_php7.0.c>
      # Tested with Apache2 + mod-php7
      php_admin_flag engine off

    <IfModule sapi_apache2.c>
      # Not working with Apache1 + mod-php5
      php_admin_flag engine off
    <IfModule mod_perl.c>
      # Disable mod_perl
    # Disable mod_python...

    # Method 3:
    <FilesMatch ".">
      SetHandler default-handler
  # PHP logs for development site.
  php_admin_flag log_errors on
  php_admin_flag display_errors off

  # Set error_reporting = all errors except:
  #   8192      E_DEPRECATED
  #   16384     E_USER_DEPRECATED
  # To include decperation warnings, set the value to E_ALL (32767).
  # see .
  php_admin_value error_reporting 8191

  # NOTE: If no errors are generated at all, this file
  # will not be created (which could be confusing at first...).
  # Enable deprecation warnings (above) and the file will surely be creatred :)
  php_admin_value error_log /var/www/var/logs/i18n.php-error.log


More Information

  • FrontEndDebuggingTips for log files and PHP debugging tips.
  • This Message for a tour of the configurable 'site-specific-content'. In your local savannah instance the files are in ./savane/etc/site-specific-content.
  • FrontEndSetup - how the same PHP code is configured on savannah's servers.