Skip to content
Snippets Groups Projects
Commit 5b7dab11 authored by D4rkHeart's avatar D4rkHeart
Browse files

[Update] Renamed the config.php template to be used as the real config.php

parent a82429ce
No related branches found
No related tags found
1 merge request!912 factored the form application and the DB connection
<?php
if (count(get_included_files()) == 1) exit("Direct access not permitted.");
$CONFIG = array(
'docker' => array(
'FILESERVERPATH' => '/var/www/html/data/candidatures/',
'SENDEMAILS' => true,
'MAIL_FROM' => 'noreply+formulaireApprentis@epfl.ch',
'MAIL_CONTACT' => 'nicolas.borboen@epfl.ch',
'MAIL_REPLYTO' => 'nicolas.borboen@epfl.ch',
'DB_NAME' => 'canap_db',
'DB_USER' => 'canap_db',
'DB_PASS' => 'canap_db',
'DB_HOST' => 'db',
'DB_PORT' => '3306',
),
'local' => array(
'FILESERVERPATH' => '/var/www/html/data/candidatures/',
'SENDEMAILS' => false,
'MAIL_FROM' => 'noreply+formulaireApprentis@epfl.ch',
'MAIL_CONTACT' => 'formation.apprentis@epfl.ch',
'MAIL_REPLYTO' => 'formation.apprentis@epfl.ch',
'DB_NAME' => 'canap_db',
'DB_USER' => 'xxx',
'DB_PASS' => 'xxx',
'DB_HOST' => 'localhost',
'DB_PORT' => '3306',
),
'prod' => array(
'FILESERVERPATH' => '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\',
'SENDEMAILS' => true,
'MAIL_FROM' => 'noreply+formulaireApprentis@epfl.ch',
'MAIL_CONTACT' => 'formation.apprentis@epfl.ch',
'MAIL_REPLYTO' => 'formation.apprentis@epfl.ch',
'DB_NAME' => 'canap_db',
'DB_USER' => 'xxx',
'DB_PASS' => 'xxx',
'DB_HOST' => 'mysql-fac.epfl.ch',
'DB_PORT' => '33003',
),
);
// Change with docker / local / prod
define('ENVIRONMENT', 'docker');
if (!isset($_SESSION)) { session_start(); }
if ($CONFIG[ENVIRONMENT] !== 'prod') {
ini_set("display_errors", 1);
error_reporting(E_ALL);
} else {
ini_set("display_errors", 0);
error_reporting(0);
}
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment