Skip to content

Contributing: Getting Started

jmathai edited this page Aug 27, 2012 · 2 revisions

Getting Started

Configuration

Defaults

The default configuration values are found in src/configs/defaults.ini.

Override

You can override any default values by having the same entry with a different value in a file named src/configs/override.ini

Backend

Logs

OpenPhoto does a lot of logging, which is very helpful during development. The destination for these logs depends on your PHP configuration. For example, by default on an Ubuntu installation with Apache, the settings of interest in /etc/php5/apache2/php.ini are:

log_errors = On
;error_log =     # default value is empty

It means that the logs can be found in /var/log/apache2/error.log (still on Ubuntu with Apache).

Useful debugging information is logged at the info logging level in OpenPhoto, which is not displayed by default. To enable it, add the following to your config file in src/userdata/configs/[config file].ini:

[epi]
logLevels="crit,warn,info"

The default value is "crit,warn" and is set in src/configs/defaults.ini.

Note: If you will be working on the set-up process, that happens before the config file in userdata is created, it can be useful to change the logLevels line in defaults.ini. Just make sure you don’t commit this change.

Frontend

Static assets

OpenPhoto runs in either prod (default) or dev mode. In prod mode the JavaScript and CSS assets are combined and minified. The minified and combined files are generated at runtime and stored in src/html/assets/cache/ for subsequent requests.

If you are going to modify the CSS or JavaScript, make sure you set the mode to dev in the override config file:

[site]
mode=dev