This commit is contained in:
Michael RICOIS 2013-02-20 09:39:17 +00:00
parent e473d586d3
commit cfa827aba1
2 changed files with 119 additions and 0 deletions

View File

@ -0,0 +1,51 @@
[production]
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
autoloaderNamespaces[] = "Application_"
resources.layout.layout = "main"
resources.layout.layoutPath = APPLICATION_PATH "/views"
resources.view.basePath = APPLICATION_PATH "/views"
; Scores configuration
profil.server.name = sdsrvdev01
profil.webservice.location = local
profil.mail.method = smtp
profil.mail.smtp_host = smtp.free.fr
profil.mail.email.support = support@scores-decisions.com
profil.mail.email.supportdev = supportdev@scores-decisions.com
profil.path.data = "/sites/dataenrichissement"
profil.db.local.adapter=mysqli
profil.db.local.params.host=127.0.0.1
profil.db.local.params.username=root
profil.db.local.params.password=bj10sx
profil.db.local.params.dbname=enrichissement
profil.db.local.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8"
profil.db.jo.adapter=mysqli
profil.db.jo.params.host=88.190.14.56
profil.db.jo.params.port=53336
profil.db.jo.params.username=wsuser
profil.db.jo.params.password=wspass2012
profil.db.jo.params.dbname=jo
profil.db.jo.params.driver_options.MYSQLI_INIT_COMMAND = "SET NAMES utf8"
[staging : production]
resources.frontController.params.displayExceptions = 0
phpSettings.soap.wsdl_cache_enabled = 0
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
phpSettings.soap.wsdl_cache_enabled = 0
resources.frontController.params.displayExceptions = 1
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

View File

@ -0,0 +1,68 @@
<?php
//error_reporting(E_ALL & ~E_NOTICE);
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
//Copie de la configuration
$configDir = realpath(dirname(__FILE__)).'/config';
$appconfigDir = APPLICATION_PATH.'/configs';
$hostname = exec('echo $(hostname)');
passthru('cp -fv '.
$configDir.'/'.$hostname.'/application.ini' . ' ' .
$appconfigDir.'/application.ini');
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
try {
$opts = new Zend_Console_Getopt(
//Options
array(
'help|?' => "Affiche les informations d'utilisation",
'check' => "Vérifie la configuration suivant le fichier de config installé",
'install' => "Installe et configure",
)
);
$opts->parse();
} catch (Zend_Console_Getopt_Exception $e) {
echo $e->getUsageMessage();
exit;
}
//Usage
if(isset($opts->help))
{
echo $opts->getUsageMessage();
exit;
}
$c = new Zend_Config($application->getOptions());
if(isset($opts->check))
{
}
elseif(isset($opts->install))
{
//Modification des permissions
passthru('chown -R www-data: '.APPLICATION_PATH.'/../')
}