Configuration

We normally deploy to 3 server environments: production, staging (for client review and testing) and development (your local PC).

Database configuration

The database details for each environment are stored in /application/configs/application.ini under the corresponding sections.

Copy /application/configs/application.ini.dist to /application/configs/application.ini and enter the database details:

[production]
resources.db.params.host = "localhost"
resources.db.params.username = ""
resources.db.params.password = ""
resources.db.params.dbname = ""

[staging : production]
resources.db.params.host = "localhost"
resources.db.params.username = ""
resources.db.params.password = ""
resources.db.params.dbname = ""

[development : production]
resources.db.params.host = "localhost"
resources.db.params.username = ""
resources.db.params.password = ""
resources.db.params.dbname = ""

APPLICATION_ENV configuration

The second line of the .htaccess file at /httpdocs/.htaccess controls which section of the application.ini is active.

Copy /httpdocs/htaccess.dist to /httpdocs/.htaccess

DirectoryIndex index.html index.php
SetEnv APPLICATION_ENV development
SetEnv DEFAULT_LANG en_GB
AddDefaultCharset UTF-8
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /index.php [NC,L]

Folder permissions

The following folders need to be writable by Apache:

/application/data
/httpdocs/UserFiles
/httpdocs/uploads

We normally chmod -R 777 the above folders in a development environment and use a restricted set of permissions or suPHP on staging and production depending on the platform.

Related nodes
$nodes = $this->node->getCollection()->getRelated();

No related nodes for this node