### Configure Timezone for PHP
```shell
-echo "date.timezone=${PHP_TIMEZONE:-UTC}" > $PHP_INI_DIR/conf.d/date_timezone.ini
+for i in apache2 cli; do
+ echo "date.timezone = \"Europe/Paris\"" > /etc/php5/${i}/conf.d/date_timezone.ini
+done
```
### Postgres from Postgres PPA
## 3. Installation
-Let say Comptoir-SRV is installed in dir `/home/comptoir/srv/`, do
+Let say Comptoir-SRV is installed in dir `/home/comptoir/comptoir-srv/`, do
### Composer install
```shell
-cd /home/comptoir/srv/
+cd /home/comptoir/comptoir-srv/
/usr/local/bin/composer install --no-dev \
&& sed -i "s/'debug' => true/'debug' => false/" config/app.php
```
### Set UNIX permissions
```shell
-cd /home/comptoir/srv/
+cd /home/comptoir/comptoir-srv/
sudo chown -R comptoir.www-data webroot logs tmp
sudo chmod -R o-w *
for i in webroot logs tmp; do
done
```
-### Configure Postgres credentials
+### CakePHP: Configure database credentials
Adjust Postgres credentials in `config/app.php`
+Search for
+
+```
+ 'Datasources' => [
+ 'default' => [
+```
+
+then replace `'driver' => 'Cake\Database\Driver\Mysql',` by `'driver' => 'Cake\Database\Driver\Postgres',`
+
+and adjust:
+
+* username
+* password
+* database
+* timezone: set to Europe/Paris
+
+/!\ ACHTUNG /!\
+
+For production servers: you MUST comment all the "test" db connector
+
### Apache Virtual host + mod_rewrite
* Create an Apache Virtual host pointing to `/home/comptoir/srv/webroot` (don't forget to point to the `webroot` directory)