Back to top

Autore Topic: Parse error: syntax error, unexpected T_VARIABLE  (Letto 1565 volte)

Offline ariete1

  • Nuovo arrivato
  • *
  • Post: 37
    • Mostra profilo
Parse error: syntax error, unexpected T_VARIABLE
« il: 06 Mar 2012, 12:00:42 »
Salve a tutti, ho bisogno di aiuto sono disperato ho finito un sito con joomla 2.5.1 e allŽimproviso mi e uscito questo erroe :
Parse error: syntax error, unexpected T_VARIABLE in [font=]/home/content/84/9049684/html/libraries/joomla/plugin/plugin.php[/font] on line [font=]98[/font]
Cosa significa non sono molto bravo con i codici come posso risolere? come capisco dove é lŽerrore  e come trovo la on line 98 ?
vi prego aiutatemi grazie a tutti

Sono riuscito a mettere il punto e virgola dove mancava e riesco ad entrare nel pannello admin di joomla, ma lato sito mi da questo e non so cosa modificare e in che punto farlo incollo lŽerrore: 
Fatal error: Using $this when not in object context in /home/content/84/9049684/html/libraries/joomla/plugin/plugin.php on line 103

se riuscite ad indentificare dove dovrei modificare mi fareste un grosso favore:

<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Plugin
 *
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * JPlugin Class
 *
 * @package     Joomla.Platform
 * @subpackage  Plugin
 * @since       11.1
 */
abstract class JPlugin extends JEvent
{
   /**
    * A JRegistry object holding the parameters for the plugin
    *
    * @var    A JRegistry object
    * @since  11.1
    */
   public $params = null;

   /**
    * The name of the plugin
    *
    * @var    string
    */
   protected $_name = null;

   /**
    * The plugin type
    *
    * @var    string
    */
   protected $_type = null;

   /**
    * Constructor
    *
    * @param   object  &$subject  The object to observe
    * @param   array   $config    An optional associative array of configuration settings.
    *                             Recognized key values include 'name', 'group', 'params', 'language'
    *                             (this list is not meant to be comprehensive).
    *
    * @since   11.1
    */
   public function __construct(&$subject, $config = array())
   {
      // Get the parameters.
      if (isset($config['params']))
      {
         if ($config['params'] instanceof JRegistry)
         {
            $this->params = $config['params'];
         }
         else
         {
            $this->params = new JRegistry;
            $this->params->loadString($config['params']);
         }
      }

      // Get the plugin name.
      if (isset($config['name']))
      {
         $this->_name = $config['name'];
      }

      // Get the plugin type.
      if (isset($config['type']))
      {
         $this->_type = $config['type'];
      }

      parent::__construct($subject);
   }

   /**
    * Loads the plugin language file
    *
    * @param   string  $extension  The extension for which a language file should be loaded
    * @param   string  $basePath   The basepath to use
    *
    * @return  boolean  True, if the file has successfully loaded.
    *
    * @since   11.1
    */
   public function loadLanguage($extension = '', $basePath = JPATH_ADMINISTRATOR)
   {
      if (empty($extension))
      {
         $extension = 'plg_' ; $this->_type . '_' . $this->_name;
      }

      $lang = JFactory::getLanguage();
      return $lang->load(strtolower($extension), $basePath, null, false, false)
         || $lang->load(strtolower($extension), JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name, null, false, false)
         || $lang->load(strtolower($extension), $basePath, $lang->getDefault(), false, false)
         || $lang->load(strtolower($extension), JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name, $lang->getDefault(), false, false);
   }
}


Grazie a tutti
 
« Ultima modifica: 06 Mar 2012, 12:54:35 da ariete1 »

mau_develop

  • Visitatore
Re:Parse error: syntax error, unexpected T_VARIABLE
« Risposta #1 il: 06 Mar 2012, 13:00:44 »
all'improvviso non succede mai nulla, avrai fatto qualcosa... upload maldestri .. file corrotti... editor non adattia qualche modifica... insomma non so cosa ma qualcosa hai fatto.
Hai cercato nel forum o con gugle usando quella stringa di errore e aggiungendo +joomla ?
modificare il core di joomla non mi sembra la soluzione.

M.

Offline ariete1

  • Nuovo arrivato
  • *
  • Post: 37
    • Mostra profilo
Re:Parse error: syntax error, unexpected T_VARIABLE
« Risposta #2 il: 06 Mar 2012, 13:43:18 »
Si, lŽerrore mi e uscito dopo aver eliminato dei moduli ma dopo li ho recuperati dal cestino e messi tutti on-line per vedere se lŽerrore si levava, ho cercato in google e mi ha riportato ne forum in unŽaltra sezione,


http://forum.joomla.it/index.php?topic=135868.0


adesso provo modulo per modulo ad eliminare e vedo cosa succede

Offline maicolstaip

  • Global Moderator
  • Instancabile
  • ********
  • Post: 17623
  • Sesso: Maschio
    • Mostra profilo
Re:Parse error: syntax error, unexpected T_VARIABLE
« Risposta #3 il: 06 Mar 2012, 13:52:13 »
Ciao ariete1,
non è che sul server hai il vecchio php4?
Non si risponde a PM tecnici. Postate sul forum. Grazie.

Offline ariete1

  • Nuovo arrivato
  • *
  • Post: 37
    • Mostra profilo
Re:Parse error: syntax error, unexpected T_VARIABLE
« Risposta #4 il: 06 Mar 2012, 14:07:32 »
No sul server ho php 5.3,
Comunque ho risolto era un modulo pubblicato " leste Discussion " che adesso ho cestinato ma mi sembra strano che non sia compatibile o faccia conflitto  :o

 



Web Design Bolzano Kreatif