Follow these instructions to install FlickRibbon and set up a local development environment.
Set up server
You will need Apache, MySQL and PHP up and running.
You should now be able to access http://localhost/
Take note of what directory corresponds to your web root. For example, http://localhost/foo might correspond to /Library/WebServer/Documents/foo.
Apache & PHP Requirements
For CakePHP it is important that apache & PHP have mod_rewrite installed and
your webroot has this line in apache's httpd.conf
AllowOverride All
See CakePHP Apache & mod_rewrite for the more information.
Install IDE
You can use the IDE of your choice, but we have instructions for setting up the most common ones
Install PEAR
PEAR is needed for the CakePHP Migrations to function properly.
- Go to this page and save this page as go-pear.php in same location as latest pear version.
- Open the terminal and change directory to the
go-pear.php location and execute command $ php go-pear.php
- Follow the instructions of install
- Windows only: Double click on registry file as specified at end of install (usually
PEAR_ENV.reg).
- Copy the entire latest version of PEAR folder (ex PEAR-1.7.2) into a preferred location.
- Suggested directory for Windows:
C:\PEAR
- Suggested directory for OS X:
/usr/bin/pear (you will need to create the directory first)
- Test PEAR to make sure it is running. Running the following command should show you the options you have available. From the command line, do the following
- Windows:
> C:\PEAR\pear.bat
- Linux or OSX:
$ /usr/bin/pear/bin
- In command prompt, execute commands:
-
$ pear install MDB2
- $ pear install MDB2_Driver_mysql
- You now need to add the PEAR directory (
C:\PEAR\pear or /usr/bin/pear/bin/pear) to your systems PATH.
Configuring local copy
You can now obtain and modify your local copy of the Flickr Contestr project.
Checkout FlickRibbon
Use your IDE to checkout the current copy of the project into your webserver directory. In the example used above, this would be /Library/WebServer/Documents/
Modifications and configurations
- In the terminal, navigate to the folder where you checked out the code and execute the follow:
$ chmod 755 app/tmp/*
$ cd app/config
$ mv core.default.php core.php
$ mv database.default.php database.php
$ mv config.default.php config.php
- Note: Make sure that your SVN client doesn't try to commit
core.php or database.php. In NetBeans, this means that the first time it sees the file (after you execute the commands above), it will turn green (meaning it will add it to SVN during the next commit). To prevent this you must Right click > Subversion > Ignore the file BEFORE you do a commit.
- Now edit the
config/database.php to match your local database settings configuration. More information editing the database config file.
- Now edit
config/config.php to contain the Flickr API key. If you are on the core development team, email Jeremy (aka Auzigog) For the key. You can also request your own Flickr API key.
Migrate your database
To make sure your database matches the current version of the code, you need to install CakePHP migrations and run the following command from the terminal:
./cake migrate
- Note: See CakePHP migrations for the more information.
Any other problems
If you encounter problems while installing Flickr Contestr, it may be helpful to refer to the documentation for installing a generic CakePHP application.