-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
Below are the instructions and requirements to run the application.
- PHP 5 or greater
- MySql 5 or greater (soon we will be able to accept almost any database)
- Apache and mod_rewrite are desirable
First, download the zip file containing the source of the application, it can be done by clicking here.
Unzip the file and you will get a folder with all the source inside.You can rename this folder to whatever you want and put it inside the document root of your web server.
Make sure you give permissions to read all the files to the user of your web server.
You need to give the web server access to write in some directories, they are:
- /app/tmp/cache
- /app/tmp/logs
- /app/tmp/sessions
- /app/webroot/img/upload/Speaker
CakePHP has support for URL rewriting using Apache’s mod_rewrite. If you are not using apache, or doesn’t have mod_rewrite enabled in your server, you still can run the application but you will not have the sexy-urls thing.
If you use Apache and has mod_rewrite enabled, the application will work as-is. But if you haven’t, you just need to follow these steps:
- Open /app/config/core.php
- Un-comment line 68 of this file, the line should end up like this:
Configure::write('App.baseUrl', env('SCRIPT_NAME'));
There is a SQL file in /app/config/schema/cfp.sql that you can use to create a database. This SQL file will create a database named cfp and all the tables of the project. If you want to, you can create a user and grant permissions to this database separately.
In our case, let’s say the configurations to access our MySQL database are:
- Host: 127.0.0.1
- User: root
- Password:
- Database: cfp
With the database created, you have to configure CakePHP to access the database, to do that:
- Rename/Copy the /app/config/database.php.default to /app/config/database.php
- Edit the /app/config/database.php to look like this: (supposing the above mentioned scenario)
var $default = array( 'driver' => 'mysql', 'persistent' => false, 'host' => '127.0.0.1', 'login' => 'root', 'password' => '', 'database' => 'cfp', 'prefix' => '', );
After all that is done, you can point your browser to the address and actually see the application. You will see a login form with a registration link. Register yourself first of all and go on.
By nature, the application is configured to run in production environments, that means all errors are suppressed and if they come to happen, a beautiful and withe screen is presented. How can you change that? By telling CakePHP that you want to run in Debug mode, here is how to do it:
- Open /app/config/core.php
- By line 37 of this file you will find the Debug option, what values can it take:
- 0 – Production
- 1 – Development
- 2 – Development + SQL executions
So if you are a developer, the right value of this options is 2 (two), like this:
Configure::write('debug', 2);