2016-09-13 43 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']; 

重新加載後,您應該看到一個擴展名和文件名列表,最後一個是導致問題的那個。