Phalcon Framework 2.0.13

Phalcon\Assets\Exception: The collection does not exist in the manager

phalcon/assets/manager.zep (231)
#0Phalcon\Assets\Manager->get(js_header_principal)
#1Phalcon\Assets\Manager->outputJs(js_header_principal)
/home/euroinnova.es/public_html/phalcon/app/views/index.phtml (40)
<?php use Phalcon\Tag as Tag; ?>
<?php use Phalcon\Mvc\View;?>
<?php use Phalcon\DI as PhalconDI;?>
<!DOCTYPE html>
<html lang="es">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="UTF-8">
    <?php
    //vamos a poner el canonical, ya que hay indexados cursos con promo en google
    $headers = getallheaders();
    $di = phalconDI::getDefault();
    $pais = $di->getShared("pais_conf")->pais_conf;
    $dominio = $pais->dominio;
    $scheme = "https://";
    if($pais->dominio == "www.euroinnova.edu.es"){
        $scheme = "https://";
    }
    $url = $headers["Canonical"];
    if($url == "/"){
        $url = "";
    }
    ?>
    <?php $dominios = Utils::db_query("SELECT * FROM euroinnova_organizacion_internacional eoi INNER JOIN pais p ON p.id_pais= eoi.id_pais GROUP by dominio ")->fetchAll();?>
    <?php $request_uri = $_SERVER['HTTP_CANONICAL']; ?>
    <?php foreach($dominios as $dominioint):?>
        <link rel="alternate" hreflang="es-<?php print strtolower($dominioint->codigo_iso);?>" href="https://<?php print $dominioint->dominio . $request_uri; ?>"/>
    <?php endforeach;?>
    <link rel="canonical" href="<?php print str_replace("/amp","",$scheme.$dominio.strtolower($url));?>">
    <link rel="amphtml" href="<?php print $scheme.$dominio.strtolower($url)."/amp";?>">
    <link rel="shortcut icon" href="https://www.euroinnova.edu.es/sites/default/files/favicon.ico"/>
    <link href="https://plus.google.com/+euroinnova" rel="publisher">
    <?php print ucwords(Tag::getTitle());?>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="keywords" content="<?php print $keywords?$keywords:"cursos online";?>" />
    <meta name="description" content="<?php print $description?$description:"Encuentra todos los cursos online y cursos online homologados en Euroinnova Business School. Benefíciate de grandes descuentos.";?>">
    <meta name="author" content="Euroinnova Business School">
    <meta property="fb:app_id" content="294314127340504" />
 
    <?php $this->assets->outputJs("js_header_principal");?>
 
 
</head>
<body>
<script type="application/ld+json">
        {
           "@context": "http://schema.org",
           "@type": "WebSite",
           "url": "https://www.euroinnova.edu.es/",
           "potentialAction": {
             "@type": "SearchAction",
             "target": "https://www.euroinnova.edu.es/busqueda-cursos?s={search_term_string}",
             "query-input": "required name=search_term_string"
           }
        }
        </script>
<script type="application/ld+json">
{
  "@context" : "http://schema.org",
  "@type" : "Organization",
  "name" : "Euroinnova Formación",
  "url" : "https://www.euroinnova.edu.es",
  "logo" : "https://cdn.euroinnova.edu.es/euroinnova_es/img/logo-cabecera-euroinnova.png",
  "sameAs" : [
    "https://twitter.com/Euroinnova",
    "https://www.facebook.com/cursosymaster",
    "https://plus.google.com/+euroinnova",
    "https://es.linkedin.com/in/cursosonline",
    "https://www.youtube.com/user/CursosEuroinnova"
 ]
}
</script>
<script type="text/javascript">
    function setCookie(cname, cvalue, exdays) {
        var d = new Date();
        d.setTime(d.getTime() + (exdays*24*60*60*1000));
        var expires = "expires="+ d.toUTCString();
        document.cookie = cname + "=" + cvalue + "; " + expires;
    };
 
    function getCookie(cname) {
        var name = cname + "=";
        var ca = document.cookie.split(';');
        for(var i = 0; i <ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0)==' ') {
                c = c.substring(1);
            }
            if (c.indexOf(name) == 0) {
                return c.substring(name.length,c.length);
            }
        }
        return "";
    }
 
    var testCookie = getCookie("testc");
 
    if(!testCookie){
        //genera numero del 1 al 4
        var numbert = Math.floor((Math.random() * 4) + 1);
        if(numbert <=2){
            test="cri";
        }else{
            test="soc";
        }
        setCookie("testc",test,365);
    }
</script>
<section class="container">
    <?php if($_SERVER["HTTP_HOST"] == "euroinnova.edu.es" || $_SERVER["HTTP_HOST"] == "www.euroinnova.edu.es" || $_SERVER["HTTP_HOST"] == "1.euroinnova.edu.es"):?>
      <?php if(!isset($_COOKIE["acepta_cookies"])):?>
        <div class="cont_aviso_cookies row">
            <div class="cerrar"></div>
            <p>Este sitio web utiliza cookies propias y de terceros para optimizar su navegación, adaptarse a sus preferencias y realizar labores analíticas. Al continuar navegando acepta nuestra <a href="/Politica-Cookies">política de cookies</a>.</p>
        </div>
      <?php endif?>
    <?php endif;?>
    <?php if(isset($usuarioDrupal->user->uid) && $usuarioDrupal->user->uid > 0):?>
    <div class=" row posicionamiento" style="background: #5bc0de;padding: 10px;text-align: right;">
        <section class="titulaciones hide-matriculacion">
            <nav class="barra-toggle bs-callout bs-callout-danger" >
                <span class="">Palabras Posicionadas para esta url en Google</span>
                <a class="glyphicon glyphicon-chevron-down icon-collapse" data-toggle="collapse" href="#posicionamiento" aria-hidden="true"></a>
            </nav>
            <div id="posicionamiento" class="bs-callout bs-callout-danger collapse">
                <div class="col-sm-12">
                    <ul>
                        <?php $palabras = Utils::db_query("SELECT keywords,posicion,volumen FROM keywords_url_ranking_google WHERE url='".$_SERVER["HTTP_URL"]."' ORDER BY posicion ASC")->fetchAll();?>
                        <?php foreach($palabras as $palabra):?>
                            <li class="col-sm-6 palabra_posicionada"><strong></strong><?php print $palabra->keywords."</strong>(".$palabra->posicion.")[".$palabra->volumen."]";?>  <a href="https://www.google.es/?q=<?php print urlencode($palabra->keywords)."#q=".urlencode($palabra->keywords);?>">Buscar en Google</a></li>
                        <?php endforeach;?>
                    </ul>
                </div>
                <div class="clear clearfix"></div>
            </div>
 
 
        </section>
 
    </div>
    <?php endif;?>
    <?php
    if($enable_menu == true){
        print Utils::customRenderTemplate("navigation_menu_responsive",array("menu_title"=>$menu_title));
    }
    //pintamos el contenido
    echo $this->getContent();
    ?>
    <footer id="footer-euroinnova" class="row">
 
        <div class="">
            <div class="footer_euroinnova_new">
                <div class="">
                    <div class="elemento_footer col-sm-6 ">
                        <div class="titulo_footer">Colaboramos con</div>
                        <div class="logo_footer">
                            <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/camilo-jose-cela-40.png"
                                 alt="Universidad Camilo José Cela">
                            <img
                                src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/miguel-de-cervantes-40.png"
                                alt="Universidad Europea Miguel de Cervantes">
                            <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/nebrija-40.png"
                                 alt="Universidad Nebrija">
                            <img
                                src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/universidad-rey-juan-carlos-40.png"
                                alt="Universidad Rey Juan Carlos">
 
                        </div>
                    </div>
                    <div class="elemento_footer col-sm-6">
                        <div class="pull-right">
                            <div class="titulo_footer">Formamos parte de</div>
                            <div class="logo_footer">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/apel-40.png" alt="Asociación de Proveedores de e-Learning">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/aenoa-40.png" alt="AENOA">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/cecap-40.png" alt="CECAP">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/rsc-40.png" alt="Responsabilidad Social Corporativa">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/feder-redes.jpg" alt="FEDER-RED.ES" style="width: 45%;">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logojunta.png" alt="junta de andalucia" style="width: 26%;">
                            </div>
                        </div>
                        <div class="clear clearfix"></div>
                    </div>
                </div>
                <div class="separatoooor" style="margin-bottom: 20px;"></div>
                <div class="row">
                    <div class="elemento_footer col-sm-4">
                        <div class="titulo_footer">Agencia de colocación autorizada Nº 9900000169</div>
                        <div class="logo_footer">
                            <img
                                src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/ministerio-colocacion-34.png"
                                alt="Ministerio de Empleo y Seguridad Social">
                        </div>
                    </div>
 
                    <div class="elemento_footer col-sm-3">
                        <div class="titulo_footer">Certificación de Calidad</div>
                        <div class="logo_footer">
                            <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/confianza-online-34.png"
                                 alt="Confianza Online">
                            <img
                                src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/cursos-online-distancia-euroinnova-34.png"
                                alt="AENOR Empresa Registrada">
                            <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/aenor-iso-34.png"
                                 alt="AENOR Gestión Ambiental - UNE-EN ISO 14001">
                        </div>
                    </div>
 
                    <div class="elemento_footer col-sm-5">
                        <div class="pull-right">
                            <div class="titulo_footer">Tecnológico</div>
                            <div class="logo_footer">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/adobe-34.png"
                                     alt="Adobe Certified Associate">
                                <img
                                    src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/certificacion-amadeus-34.png"
                                    alt="Amadeus">
                                <img
                                    src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/google-apps-education-34.png"
                                    alt="Google Apps Authorized Reseller">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/hapta_small-34.png"
                                     alt="HP Accredited Technical Associate">
                                <img src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/microsoft-34.png"
                                     alt="Microsoft Office">
                                <img
                                    src="//cdn.euroinnova.edu.es/euroinnova_es/img/logos-footer-euroinnova/sage-software-authorized-partner-34.png"
                                    alt="Sage software">
                            </div>
                        </div>
                    </div>
                    <br>
                    <div class="col-sm-12">
                        <p style="text-align: center"><a rel="nofollow" title="Aviso Legal" href="/Cursos-Homologados-Aviso-Legal">Aviso Legal</a> | <a rel="nofollow" title="Pol&iacute;tica de Privacidad" href="/Cursos-Homologados-Politica-de-Privacidad">Pol&iacute;tica de Privacidad</a> | <a rel="nofollow" title="Pol&iacute;tica de Calidad" href="/Cursos-A-Distancia-Certificacion-Calidad">Pol&iacute;tica de Calidad</a> | <a rel="nofollow" title="Pol&iacute;tica de Cookies" href="/Politica-Cookies">Pol&iacute;tica de Cookies</a> | &copy; 2004 / <?php echo date("Y", time())?></p>
                    </div>
                </div>
            </div>
        </div>
        <?php if(isset($footer_home) && $footer_home){
            print $footer_home;
        }?>
    </footer>
</section>
<!--Zona de Javascript-->
 
<?php $this->assets->outputCss("css_header_assets"); ?>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"/>
 
<?php
try{
    $this->assets->outputJs("js_header_assets");
}catch(Exception $e){
    print $e->getMessage();
}
 
?>
 
<?php $this->assets->outputJs("footer_assets"); ?>
<?php
if($this->assets->collection('footer_assets_curso')->count()){
    $this->assets->outputJs("footer_assets_curso");
}
?>
 
 
 
<div id="datos-empresa" itemscope itemtype="http://schema.org/EducationalOrganization">
    <meta itemprop="name" content="Euroinnova Formación"  />
    <meta itemprop="description" content="EUROINNOVA BUSINESS SCHOOL es una Escuela de Negocios líder a nivel europeo en la impartición de Cursos Online Homologados, Cursos Online, Cursos A Distancia." />
    <meta itemprop="telephone" content="(+34)958 050 200"  />
    <meta itemprop="faxNumber" content="(+34)958 050 200"  />
    <meta itemprop="email" content="formacion@euroinnova.com" />
    <meta itemprop="url" content="https://www.euroinnova.edu.es/" />
    <meta itemprop="duns" content="470161733" />
    <meta itemprop="logo" content="https://cdn.euroinnova.edu.es/euroinnova_es/img/logo-cabecera-euroinnova-up.png" />
    <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <meta itemprop="streetAddress" content="Edificio Centro Empresas Granada Oficina 1-D"/>
        <meta itemprop="postalCode" content="18230"/>
        <meta itemprop="addressLocality" content="Atarfe"/>
        <meta itemprop="addressRegion" content="Granada"/>
    </span>
 
</div>
 
<!--Modal Descuento-->
<div id="modalCupon" class="modal face hide-xs" role="dialog">
    <?php echo Utils::customRenderTemplate("formulario_cupon_descuento"); ?>
</div>
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" async defer />
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css" async defer>
<!--<script type="text/javascript" src="https://1.euroinnova.edu.es/phalcon/js/snowfall.jquery.min.js"></script>-->
<!--<script>window.onload = (function(){-->
<!--        options = {-->
<!--            flakeCount : 200,        // number-->
<!--            flakeColor : '#ffffff', // string-->
<!--            flakeIndex: 999999,     // number-->
<!--            minSize : 1,            // number-->
<!--            maxSize : 4,            // number-->
<!--            minSpeed : 2,           // number-->
<!--            maxSpeed : 5,           // number-->
<!--            round : true,          // bool-->
<!--            shadow : true,         // bool-->
<!--            deviceorientation : true// string-->
<!--        };-->
<!--        $("body").snowfall(options);-->
<!--    })()-->
<!--</script>-->
<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
 
    ga('create', '<?php print $paisConf->id_analytics;?>', 'auto');
    ga('send', 'pageview');
 
</script>
<?php print $analytics;?>
 
    <!-- Piwik -->
    <script type="text/javascript">
 
        var _paq = _paq || [];
        <?php if(isset($piwik_track) && $piwik_track): ?>
        <?php print $piwik_track;?>
        <?php else:?>
        _paq.push(['trackPageView']);
        <?php endif;?>
        _paq.push(['enableLinkTracking']);
        (function() {
            var u="https://analitica.euroinnova.edu.es/";
            _paq.push(['setTrackerUrl', u+'piwik.php']);
            _paq.push(['setSiteId', 1]);
            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
            g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
        })();
 
    </script>
    <noscript><p><img src="//analitica.euroinnova.edu.es/piwik.php?idsite=1" style="border:0;" alt="ptracking" /></p></noscript>
    <!-- End Piwik Code -->
<?php //endif;?>
<?php if(!isset($_GET["l"]) && $_GET["l"] != "v2"):?>
<!-- End Piwik Code -->
<script type="text/javascript">
    var LHCChatOptions = {};
    LHCChatOptions.opt = {widget_height:140,widget_width:300,popup_height:520,popup_width:500};
    LHCChatOptions.callback = {
        start_chat_cb:function(type){
            $('#lhc_iframe').contents().find('#form-start-chat').submit(function(){
                $.jStorage.set("uuid",$("#form-start-chat input[name='mail']").val());
                _paq.push(['trackEvent', 'Form Chat', 'start', $("#form-start-chat input[name='mail']").val()]);
 
            })
 
        }};
    window.onload=function(){
        var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
        var refferer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
        var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
        po.src = '//<?php print $_SERVER["HTTP_HOST"]=="euroinnova.local"?"www.euroinnova.edu.es":$_SERVER["HTTP_HOST"]; ?>/chat-soporte/index.php/esp/chat/getstatus/(click)/internal/(position)/bottom_left/(ma)/br/(check_operator_messages)/true/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/2/(operator)/2?r='+refferer+'&l='+location;
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
    };
 
</script>
 
<?php endif;?>
<?php print $this->view->getPartial("customs/javascript_added_general");?>
<?php $this->assets->outputCss("css_header_assets_sec"); ?>
</body>
</html>
#2Phalcon\Mvc\View\Engine\Php->render(/home/euroinnova.es/public_html/phalcon/public/../app/views/index.phtml, Array([esmovil] => , [analytics] => <script type="text/javascript"> \n var _gaq = _gaq || []; \n </script>, [paisConf] => Object(stdClass)), true)
#3Phalcon\Mvc\View->_engineRender(Array([.phtml] => Object(Phalcon\Mvc\View\Engine\Php)), index, true, true, null)
#4Phalcon\Mvc\View->render(error, show404, Array([0] => 817978))
#5Phalcon\Mvc\Application->handle()
/home/euroinnova.es/public_html/phalcon/public/index.php (347)
<?php
//error_reporting(E_ALL);
//
//try {
 
/**
 * Read the configuration from an external file
 */
//require realpath('..') . "/vendor/autoload.php";
require_once dirname(__FILE__) . '/../app/config/config.php';
 
$loader = new \Phalcon\Loader();
 
define("GENERALCACHE",TRUE); 
 
/**
 * We're a registering a set of directories taken from the configuration file
 */
$loader->registerDirs(
    array(
        dirname(__FILE__) . $config->phalcon->controllersDir,
        dirname(__FILE__) . $config->phalcon->libraryDir,
        dirname(__FILE__) . $config->phalcon->modelsDir,
        dirname(__FILE__) . $config->phalcon->solariumDir,
        dirname(__FILE__) . $config->phalcon->formsDir,
        dirname(__FILE__) . $config->phalcon->swiftDir,
        dirname(__FILE__) . $config->phalcon->ampDir,
        dirname(__FILE__) . $config->phalcon->eventDir
    )
)->register();
 
$loader->registerNamespaces([
    "League\Event"    =>  dirname(__FILE__) . $config->phalcon->eventDir,
    "Predmond\HtmlToAmp"    =>  dirname(__FILE__) . $config->phalcon->ampDir,
    "Predmond\HtmlToAmp\Converter"    =>  dirname(__FILE__) . $config->phalcon->ampDir . "/Converter/",
    "Predmond\HtmlToAmp\Converter\Extensions"    =>  dirname(__FILE__) . $config->phalcon->ampDir . "/Converter/Extensions/",
 
])->register();
 
 
 
/**
 * The FactoryDefault Dependency Injector automatically register the right services providing a full stack framework
 */
$di = new \Phalcon\DI\FactoryDefault();
 
/**
 * Load router from external file
 */
$di->set('router', function () {
    require_once dirname(__FILE__) . '/../app/config/routes.php';
    return $router;
});
 
 
/**
 * Las excepciones las vamos a mostrar como un 404
 * comentar en caso de que algo falle para ver las excepciones de phalcon
 */
if ($_SERVER["HTTP_HOST"] != "euroinnova.local") {
 
    $di->set(
        'dispatcher',
        function () use ($di) {
 
            $evManager = $di->getShared('eventsManager');
 
            $evManager->attach(
                "dispatch:beforeException",
                function ($event, $dispatcher, $exception) {
                    $dispatcher->forward(
                        array(
                            'controller' => 'error',
                            'action' => 'show404',
                        )
                    );
                    return false;
                }
            );
            $dispatcher = new \Phalcon\Mvc\Dispatcher();
            $dispatcher->setEventsManager($evManager);
            return $dispatcher;
        },
        true
    );
}
 
/**
 * The URL component is used to generate all kind of urls in the application
 */
$di->set('url', function () use ($config) {
    $url = new \Phalcon\Mvc\Url();
    $url->setBaseUri($config->phalcon->baseUri);
    return $url;
});
 
 
/**
 * Creamos el servicio de formularios
 */
$di['forms'] = function () {
    return new \Phalcon\Forms\Manager();
};
 
 
/**
 * Setup the view service
 */
$di->set('view', function () use ($config) {
    $view = new \Phalcon\Mvc\View();
    $view->setViewsDir(__DIR__ . $config->phalcon->viewsDir);
    return $view;
});
 
//$di->set('dataCache', function () {
//
//    // 3 dias de cache
//    $frontCache = new Phalcon\Cache\Frontend\Data(
//      array(
//        "lifetime" => 259200
//      )
//    );
//
//    $configProduccion = array(
//      "host" => "192.168.1.102",
//      "port" => "11212",
//      'prefix' => $_SERVER["HTTP_HOST"]
//    );
//
//    $configlocal = array(
//      "host" => "localhost",
//      "port" => "11211",
//      'prefix' => $_SERVER["HTTP_HOST"]
//    );
//
//    // Memcached connection settings
//    $cache = new Phalcon\Cache\Backend\Memcache($frontCache,$configlocal);
//
//
//    return $cache;
//});
//poner esto a true si Redis esta instalado en php y escuchando
if(GENERALCACHE){
    $di->setShared('dataCacheRedis', function () {
 
        // Cache data for 2 days
        $frontCache = new \Phalcon\Cache\Frontend\Data(array(
          "lifetime" => 172800
        ));
 
        //Create the Cache setting redis connection options
        $cache = new Phalcon\Cache\Backend\Redis($frontCache, array(
          'host' => '127.0.0.1',
          'port' => 6379,
          'persistent' => true,
          'statsKey' => '_dfe_',
          'index' => 1,
          'prefix'=>$_SERVER["HTTP_HOST"]
        ));
 
 
        return $cache;
    });
 
}
$di->setShared('dataCacheFile', function () {
 
    // Cache data for 2 days
    $frontCache = new \Phalcon\Cache\Frontend\Data(array(
      "lifetime" => 172800
    ));
 
    //Create the Cache setting redis connection options
    $cache = new Phalcon\Cache\Backend\File($frontCache, array(
      'cacheDir' => '../app/cache/',
      'prefix'=>$_SERVER["HTTP_HOST"]
    ));
 
 
    return $cache;
});
/**
 * Database connection is created based in the parameters defined in the configuration file
 */
$di->setShared('db', function () use ($config) {
    $db = new \Phalcon\Db\Adapter\Pdo\Mysql(array(
        "host" => $config->database->host,
        "username" => $config->database->username,
        "password" => $config->database->password,
        "dbname" => $config->database->dbname,
        'charset' => 'UTF8',
          "persistent"=> true,
          "options"  => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
          )
    ));
 
    return $db;
});
 
/**
 * Database connection is created based in the parameters defined in the configuration file
 */
$di->setShared('dbSimo', function () use ($config) {
    $db = new \Phalcon\Db\Adapter\Pdo\Mysql(array(
      "host" => "euroinnova.eu",
      "username" => "crmuser",
      "password" => "St7GJMSr",
      "dbname" => "mayordomo",
      'charset' => 'UTF8',
      "persistent"=> true,
      "options"  => array(
        PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
      )
    ));
 
    return $db;
});
 
/**
 * Vamos a poner las sesiones comentadas para ver si se solucionan los conflictos con drupal y deja de caer el server
 */
//  $di->set('session', function(){
//    $session = new Phalcon\Session\Adapter\Files();
//    $session->start();
//    return $session;
//  });
 
/**
 * Register the flash service with custom CSS classes
 */
$di->set('flash', function () {
    $flash = new Phalcon\Flash\Direct(array(
        'error' => 'alert alert-danger',
        'success' => 'alert alert-success',
        'notice' => 'alert alert-info',
        'warning' => 'alert alert-warning',
    ));
    return $flash;
});
 
//ini_set("display_errors",1);
//$listener = new \Phalcon\Debug();
//$listener->listen();
 
//if (isset($_GET["phalcon_debug"])) {
    ini_set("display_errors",1);
    $listener = new \Phalcon\Debug();
    $listener->listen();
//}
 
$di->set('mail', function () {
    return new Mail();
});
 
//configuraacion del pais actual en el que nos encontramos
$di->setShared('pais_conf', function () {
    return new paisSelect();
});
 
$di->setShared('predictionConf', function () {
    $conf = new stdClass();
//    $conf->host = "http://192.168.50.5:8000";
//    $conf->hostEvent = "http://192.168.50.5:7070";
    $conf->apiKey = 'rWjDwY2Yve9zRbuD4sh2y9g0IFhX2bSzhuYoKdE3GUn2UhNv4Lu3rS4gfSwqFuaR';
    return $conf;
});
 
$di->setShared('SeldonConf', function () {
    $conf = new stdClass();
//    $conf->host = "http://192.168.50.4:8080/";
//    $conf->hostEvent = "http://192.168.50.4:8080/";
    $conf->apiKey = 'rWjDwY2Yve9zRbuD4sh2y9g0IFhX2bSzhuYoKdE3GUn2UhNv4Lu3rS4gfSwqFuaR';
    return $conf;
});
 
 
//clase para conectar a Solr
$di->setShared('SolariumClient', function () {
    Solarium_Autoloader::register();
    //$host = 'localhost';
    $host = '176.28.124.135';
 
    if ($_SERVER["HTTP_HOST"] == "1.euroinnova.edu.es" || $_SERVER["HTTP_HOST"] == "www.euroinnova.edu.es" || $_SERVER["HTTP_HOST"] == "euroinnova.edu.es") {
        $host = "192.168.1.105";
        //$host = "solr.euroinnova.es";
    }
    $config = array(
        'adapteroptions' => array(
            'host' => $host,
            'port' => 12000,
            'path' => '/solr/solrdrupal/',
            'timeout' => 30
        )
    );
    return new Solarium_Client($config);
});
 
//clase para conectar a Amp
$di->setShared('AmpClient', function () {
 
    require_once(__DIR__ . "/../app/library/ampparser/");
 
    return new \AMP();
});
 
//clase para saber si es mobile o tablet o desktop
$di->setShared('dispositivo', function () {
    //descomentar para poner la promo
    $detect = new MobileDetect();
 
    $conf = new stdClass();
    $conf->tablet = $detect->isTablet();
    $conf->movil = $detect->isMobile();
    return $conf;
});
 
//clase para conectar a Solr
$di->setShared('SolariumClientBlogs', function () {
    Solarium_Autoloader::register();
    //$host = 'localhost';
    $host = '176.28.124.135';
 
    if ($_SERVER["HTTP_HOST"] == "1.euroinnova.edu.es" || $_SERVER["HTTP_HOST"] == "www.euroinnova.edu.es" || $_SERVER["HTTP_HOST"] == "euroinnova.edu.es") {
        $host = "192.168.1.105";
        //$host = "solr.euroinnova.es";
    }
    $config = array(
      'adapteroptions' => array(
        'host' => $host,
        'port' => 12000,
        'path' => '/solr/blogs/',
        'timeout' => 30
      )
    );
    return new Solarium_Client($config);
});
 
$application = new \Phalcon\Mvc\Application($di);
$application->setDI($di);
$di['app'] = $application;
$listItems = 1;
//(new Snowair\Debugbar\ServiceProvider())->start();
// after start the debugbar, you can do noting but handle your app right now.
echo $application->handle()->getContent();
//} catch (Phalcon\Exception $e) {
//  echo $e->getMessage();
//} catch (PDOException $e){
//} catch (PDOException $e){
//  echo $e->getMessage();
//}
 
 
 
KeyValue
_url/blog/entrada/817978
default_value1
KeyValue
PHPRC/home/euroinnova.es/fcgi-bin/../etc/php5.6
SCRIPT_FILENAME/home/euroinnova.es/public_html/phalcon/public/index.php
PATH/usr/local/bin:/usr/bin:/bin
PWD/home/euroinnova.es/fcgi-bin
SHLVL0
PHP_FCGI_MAX_REQUESTS99999
SCRIPT_NAME/phalcon/public/index.php
REQUEST_URI/phalcon/blog/entrada/817978?default_value=1
QUERY_STRING_url=/blog/entrada/817978&default_value=1
REQUEST_METHODGET
SERVER_PROTOCOLHTTP/1.0
GATEWAY_INTERFACECGI/1.1
REDIRECT_URL/phalcon/public/blog/entrada/817978
REDIRECT_QUERY_STRING_url=/blog/entrada/817978&default_value=1
REMOTE_PORT43252
SERVER_ADMIN[no address given]
DOCUMENT_ROOT/home/euroinnova.es/public_html
REMOTE_ADDR192.168.1.102
SERVER_PORT80
SERVER_ADDR192.168.1.102
SERVER_NAME1.euroinnova.edu.es
SERVER_SOFTWAREApache/2.2.22
SERVER_SIGNATURE
HTTP_SCHEMEhttp://
HTTP_URL14-2-19/V-EDICION-DEL-SALON-MIEMPRESA
HTTP_CANONICAL/14-2-19/V-EDICION-DEL-SALON-MIEMPRESA
HTTP_USER_AGENTCCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_CONNECTIONclose
HTTP_HOST1.euroinnova.edu.es
SCRIPT_URIhttp://1.euroinnova.edu.es/phalcon/blog/entrada/817978
SCRIPT_URL/phalcon/blog/entrada/817978
REDIRECT_STATUS200
REDIRECT_SCRIPT_URIhttp://1.euroinnova.edu.es/phalcon/blog/entrada/817978
REDIRECT_SCRIPT_URL/phalcon/blog/entrada/817978
REDIRECT_REDIRECT_STATUS200
REDIRECT_REDIRECT_SCRIPT_URIhttp://1.euroinnova.edu.es/phalcon/blog/entrada/817978
REDIRECT_REDIRECT_SCRIPT_URL/phalcon/blog/entrada/817978
FCGI_ROLERESPONDER
PHP_SELF/phalcon/public/index.php
REQUEST_TIME_FLOAT1488261240.2166
REQUEST_TIME1488261240
#Path
0/home/euroinnova.es/public_html/phalcon/public/index.php
1/home/euroinnova.es/public_html/phalcon/app/config/config.php
2/home/euroinnova.es/public_html/phalcon/app/config/routes.php
3/home/euroinnova.es/public_html/phalcon/app/controllers/BlogController.php
4/home/euroinnova.es/public_html/phalcon/app/controllers/ControllerBase.php
5/home/euroinnova.es/public_html/phalcon/app/library/paisSelect.php
6/home/euroinnova.es/public_html/phalcon/app/library/Utils.php
7/home/euroinnova.es/public_html/phalcon/app/library/MobileDetect.php
8/home/euroinnova.es/public_html/phalcon/app/library/BlogUtils.php
9/home/euroinnova.es/public_html/phalcon/app/library/phpQuery.php
10/home/euroinnova.es/public_html/phalcon/app/models/longTailsVideos.php
11/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Client.php
12/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Configurable.php
13/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Query/MoreLikeThis.php
14/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Query/Select.php
15/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Query.php
16/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Client/RequestBuilder/MoreLikeThis.php
17/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Client/RequestBuilder/Select.php
18/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Client/RequestBuilder.php
19/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Client/Request.php
20/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Client/Adapter/Http.php
21/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Client/Adapter.php
22/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Client/HttpException.php
23/home/euroinnova.es/public_html/phalcon/app/library/Solarium/Exception.php
24/home/euroinnova.es/public_html/phalcon/app/views/error/show404.phtml
25/home/euroinnova.es/public_html/phalcon/app/views/index.phtml
Memory
Usage3145728