forked from mautic/mautic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_dev.php
34 lines (25 loc) · 1009 Bytes
/
index_dev.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/*
* @copyright 2014 Mautic, NP
* @author Mautic
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
define('MAUTIC_ROOT_DIR', __DIR__);
// Fix for hosts that do not have date.timezone set, it will be reset based on users settings
date_default_timezone_set('UTC');
use Mautic\Middleware\MiddlewareBuilder;
$loader = require_once __DIR__.'/vendor/autoload.php';
/*
* If you don't want to setup permissions the proper way, just uncomment the following PHP line
* read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
*/
umask(0000);
if (extension_loaded('apc') && in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1', '172.17.0.1'])) {
@apc_clear_cache();
@apc_clear_cache('user');
@apc_clear_cache('opcode');
}
\Mautic\CoreBundle\ErrorHandler\ErrorHandler::register('dev');
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
Stack\run((new MiddlewareBuilder('dev'))->resolve($kernel));