Flickr-style PHP Framework
PHP Perl Perl6 Smarty ApacheConf CSS Other
Latest commit 14bba56 Apr 27, 2015 @grantmd grantmd Fix hilarious typo
Failed to load latest commit information.
bin just add a default bin directory; add a note about pre compiling temp… Jan 10, 2012
docs doc cleanup Feb 25, 2013
extras make lib_features less complicated; update README for cache_memcache;… Sep 11, 2013
schema the pk for the users table should be 'id' everywhere. renamed the tab… Mar 4, 2011
tests if we're not using bcrypt, we need to set the password secret Oct 1, 2013
www use log_fatal() for fatal errors. Feb 16, 2014
.gitattributes Introduce end-of-line normalization Oct 19, 2010
.gitignore if PHP_CodeCoverage is installed, collect coverage information during… May 20, 2013
.travis.yml worst thing about travis: have to push every one of these goddamn cha… Oct 1, 2013
LICENSE it's 2014!~ Feb 16, 2014
Makefile we can make coverage reports even if some tests failed Jun 1, 2013 Fix hilarious typo Apr 26, 2015
TODO.txt restructured makefile so the default rule rebuilds the TODO file. May 23, 2013


Build Status

Flamework is a PHP web-application framework, born out of the processes and house-style developed at

This library is a work in progress. It is immediately usable, but lacks many of the components needed to create a fully featured modern application. These pieces are being added as the individual contributors find a need to in their personal projects. If you've written a missing piece of the puzzle, please send a pull-request.

Installation - As a base for a new project

  • Copy everything in www to a web server running Apache with mod_php and php5-mcrypt.
  • Enable AllowOverrides all for the root.
  • If some of your rewrite rules like ^account/password$ aren't working, try Options -MultiViews.
  • Copy include/config.php.example to include/config.php and edit it.
  • Ensure that the templates_c directory can be written to by your webserver.
  • Load the schema into mysql: mysql -uwww -Dflamework -p < schema/db_main.schema

That's it.

For a longer version, read the installation guide.

If you'd like to use Flamework as an external library, read this.

To install Flamework on, read this.

Global Variables

Flamework uses and assigns global PHP variables on the grounds that it's really just not that big a deal. A non-exhaustive list of global variables that Flameworks assigns is:

  • $GLOBALS['cfg'] -- A great big hash that contains all the various site configs and runtime user authentication info.

  • $GLOBALS['smarty'] -- A Smarty templating object.

  • $GLOBALS['timings'] & $GLOBALS['timing_keys'] -- Hashs used to store site performance metrics.

Some libraries use their own globals internally, usually prefixed with LIBRARYNAME_ or _LIBRARYNAME_.

Other documentation

Libraries & Tools

There are several drop-in external libraries for common tasks:

Aaron has created several starter configurations for using delegated auth:

And some random odds and ends:


If you have make and and recent perl installed (you almost certainly do), you can run the tests using:

make test

If you also have xdebug and PHP_CodeCoverage installed, you can generate test coverage information:

make cover

Test coverage needs some serious improvement.


If you don't want to mess with your local development environment, you can run the tests under Vagrant by doing:

vagrant up
vagrant ssh
cd /vagrant
make test