<?php

error_reporting(E_ALL ^ E_DEPRECATED);
ini_set("display_errors",1);

date_default_timezone_set("Europe/Rome");

//if($_SERVER["HTTPS"] != "on")
//{
//    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
//    exit();
//}

ini_set('session.gc_maxlifetime', 24*60*60*31);
session_set_cookie_params(24*60*60*31);

// change the following paths if necessary
$yii=dirname(__FILE__).'/framework/yiilite.php';
$config=dirname(__FILE__).'/protected/config/main.php';

/*error_reporting(E_ALL);
ini_set("display_errors", 1);*/

ini_set('post_max_size', '512M');
ini_set('upload_max_filesize', '512M');
ini_set('memory_limit', '512M');
set_time_limit(-1);

//require_once __DIR__."/protected/bootstrap.php";
$debug = strpos($_SERVER['HTTP_HOST'],"localhost") !== FALSE || strpos($_SERVER['HTTP_HOST'],"roberto") !== FALSE;

defined('YII_DEBUG') or define('YII_DEBUG',$debug);

// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

require_once($yii);
Yii::createWebApplication($config)->run();
