Manual - Getting started

Once cloned from git, and Apache is setup, you must do few steps:

  1. Give permission to cache/ directory. 777 For the directory and 0666 for cache/.
  2. Check that basic configuration is working. Open the browser to your Virtual Host and you may see a message like this:
  3. Edit config/general.php and change:
    define('FIRST_TIME', true);
    To:
    define('FIRST_TIME', false);
    This will enable the Framework and show you the basic DemoApp provided when you had configured the config/development.php paths.
  4. Edit config/general.php if you want to disable multi-language (default enabled)
    define('MULTILANG', true);
  5. Edit your config/development.php to reflect paths for the project and the urls
    $st_server_config = array(  'environment'   => ENVIRONMENT,
                                'web'           => array(   'http'  => 'http://develwww.cataloniafw.com/',
                                                            'http_enabled'	=> true,
                                                            'https' => 'https://develwww.cataloniafw.com/',
                                                            'https_enabled' => false),
                                'cdn'           => array(   'images' => array(  'http'  => 'http://images.cataloniafw.com/',
                                                                                'https' => 'https://images.cataloniafw.com/'),
                                                            'videos' => array(  'http'  => 'http://video.cataloniafw.com/',
                                                                                'https' => 'https://video.cataloniafw.com/')
                                                        ),
                                'storage'       => array(   'web_root'          => '/srv/web/cataloniaweb/www/',
                                                            'catfw_root'        => '/srv/web/cataloniaweb/',
                                                            'classes_root'      => '/srv/web/cataloniaweb/classes/',
                                                            'cache'             => '/srv/web/cataloniaweb/cache/',
                                                            'tmp'               => '/tmp/',
                                                            'logs'              => '/var/logs/www/'
                                                        )
                             );
  6. If you need to setup a multi-developer devel environment using server name is suggested:
    $s_requested_host = \CataloniaFramework\Requests::getServerName();
    
    if ($s_requested_host == 'devel1.yoursite.com') {
        $s_dir = '/srv/devel1.yoursite.com/yoursite.com/';
    } elseif ($s_requested_host == 'devel2.yoursite.com') {
        $s_dir = '/srv/devel2.yoursite.com/yoursite.com/';
    /* ... */
    } else {
        $s_dir = '/srv/yoursite.com/';
    }
    
    // And then redefine the array $st_server_config
    $st_server_config['storage'] = Array('web_root'     => $s_dir.'www/',
                                         'catfw_root'   => $s_dir,
                                         'classes_root' => $s_dir.'classes/',
                                         'cache'        => $s_dir.'cache/',
                                         'tmp'          => '/tmp/',
                                         'logs'         => '/var/logs/www/'
                                         );
    

Back to Main Manual page