Auto-Config
To assist you in creating a localconfig.php file, Umm provides the scripts in auto_config.html. Open it up in any standard web browser, and it will provide a form for entering your configuration. When complete, press "Generate Config File" button at the bottom of the page, and the script will give you the contents of your localconfig.php file. This has the advantage of being more intuitive for some, and the form will perform checks to ensure that your config file is logically consistent.
^ TOPDatabase setup
These are the settings which need to be set in order for Umm to use your database. The first setting is $database_type. Currently supported databases are 'sqlite', 'mysql', and 'postgresql'.
-
SQLite:
In this case, you just need to specify the SQLite database file. (For those unfamiliar with SQLite, it will be created at runtime if it doesn't exist, so just specify a nonexistent file in a writable directory). Assign the path to the $db_file variable. -
PostgreSQL:
For this, you need to set the following variables, according to the setup of your PostgreSQL server.- $db_host
- $db_user
- $db_passwd
- $db_name
- MySQL: Same as PostgreSQL.
External Programs
Umm requires several external programs, which it executes from a command-line interface. You must specify the commands to execute these programs in your localconfig.php file. If the programs are under the $PATH variable of your server user, you will be able to type just the simple commands (i.e. 'java'). If not, you will have to specify the full path to the executable (i.e. '/usr/bin/java'). Note that your $PATH variable may not be the same as the server user's.
-
$xsltproc_exe
This is for the xsltproc utility supplied by libxslt. -
For GTKMathView Users:
-
$mathmlsvg_exe
This variable is for the 'mathmlsvg' utility provided by GTKMathView. -
$rsvg_exe
This should be set to the command-line 'rsvg' utility from librsvg.
-
$mathmlsvg_exe
-
For WebEQ Users:
-
$java_exe
This is the command used to run the java interpreter. -
$webeq_jar
This variable must be set to the full path of the WebEQ .jar executable that webEqRenderer.class links with.
-
$java_exe
PHP Setup
Umm requires certain settings for several php options. Ensure that each of these options are set to the listed value.
allow_url_fopen* | On |
safe_mode_exec_dir | If safe mode is on, this must contain all external programs used by Umm. See the external programs section. |
* This option is only required by the CSS module.
^ TOPUpdating Browser Information
In order to identify users' browsers, Umm uses a combination of hard-coded information and the database from the Browser Capabilities Project. Since browsers are constantly being updated and replaced, you should update this file periodically (ideally every week or so). To do that, simply run the php script in Umm's home directory named "update_browscap.php."
Alternatively, if you are able to edit your php installation's configuration settings in php.ini, UMM can use PHP's built-in get_browser() function. To do this, simply save php_browscap.ini from this site to a location on your server, and change the 'browscap' PHP configuration setting in php.ini to be the absolute path of php_browscap.ini. If the PHP's 'browcap' configuration has been set, UMM will automatically detect it and use the built-in function. You should then update your php_browscap.ini with a new copy every so often.
^ TOPSetting an image directory (optional)
While Umm has the option of serving images directly to the database, it is much faster to simply save the files to a public directory, as it doesn't require a php script to run to retrieve the data. To get Umm to save images in the public directory, the first thing you need to do is turn off the 'database images' option. Then, you need to specify an image directory.
First make sure that Umm has write permissions to the image directory. The easiest way to do this is to put the directory under a group which includes your server user. Then give that group write permissions to the directory.
chgrp www_data /var/www/math_images chmod 775 /var/www/math_images
Next, in localconfig.php, point Umm to the image directory. Find the line where $image_directory is set, and change it to your image directory.
$image_directory = '/var/www/math_images';
Finally, set Umm to use file images. In localconfig.php, set:
$default['database images'] = false;