2016-09-13 44 views
3

我正在运行Typo3 7.6,并且愚蠢地尝试过在我的网站上过时的扩展名。我遇到了一个错误,试图卸载扩展程序,这只会让事情变得更糟。现在整个系统崩溃从前面和这个错误:Typo3在安装扩展后崩溃:解析错误:语法错误

Parse error: syntax error, unexpected '=' in /html/typo3/typo3_src-7.6.10/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php on line 1654

不知道它要我怎么处理这些信息。

这里是我的代码在ExtensionManagementUtility.php上线1654

/** 
* Execute ext_localconf.php files from extensions 
* 
* @return void 
*/ 
protected static function loadSingleExtLocalconfFiles() 
{ 
    // This is the main array meant to be manipulated in the ext_localconf.php files 
    // In general it is recommended to not rely on it to be globally defined in that 
    // scope but to use $GLOBALS['TYPO3_CONF_VARS'] instead. 
    // Nevertheless we define it here as global for backwards compatibility. 
    global $TYPO3_CONF_VARS; 
    foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $_EXTKEY => $extensionInformation) { 
     if ((is_array($extensionInformation) || $extensionInformation instanceof \ArrayAccess) && isset($extensionInformation['ext_localconf.php'])) { 
      // $_EXTKEY and $_EXTCONF are available in ext_localconf.php 
      // and are explicitly set in cached file as well 
      $_EXTCONF = isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]) ? $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY] : null; 
      require $extensionInformation['ext_localconf.php']; 
     } 
    } 
} 

如何摆脱这个烂摊子?

回答

2

如果您只想恢复安装,则需要停用该新扩展。

你可以尝试做它在安装工具(只是打电话给你,使用domain.tld/TYPO3 /安装/):在该地区的“重要行动”,你可以找到的选项检查损坏的扩展

或您手动执行:编辑typo3conf/PackageStates.php,搜索该扩展名并将状态从active更改为inactive。然后清除所有缓存!

之后您可以删除扩展名。

+0

是的! Bernd Wilkeπφ,就是这样做的。 我不得不手工完成,因为没有办法访问CMS。 感谢您为简单的解决方案提供简单的指导。 – dnp76

0

看来,这个问题来自其中一个包含文件,即您的一个扩展的配置。我不知道为什么PHP不显示实际的文件名,然后,但是呢......让我们尝试解决它:

要获取文件名,require…前插入一行输出它:

echo $_EXTKEY, " ", $extensionInformation['ext_localconf.php'], "\n"; 
require $extensionInformation['ext_localconf.php']; 

重新加载后,您应该看到一个扩展名和文件名列表,最后一个是导致问题的那个。