Actions

從先前的版本升級

From LimeSurvey Manual

This page is a translated version of the page Upgrading from a previous version and the translation is 91% complete.
附加頁:{toc}

開始之前...

....閱讀此內容,因為它非常重要:務必備份目前的安裝檔案和資料庫!

您可以使用資料庫管理工具例如 phpMyAdmin 和檔案管理器來執行此操作! 如果您不知道怎麼備份,請勿繼續下面的操作並尋找其他人的幫助。

建議使用 ComfortUpdate

最簡單/安全的升級方法就是使用我們的ComfortUpdate服務。

升級說明(從2.x或更高版本到任何之後的版本)

請按照以下說明操作:

  • 備份您的檔案和資料庫(我們之前有提過嗎?)。
  • 刪除所有舊文件/資料夾,除了以下檔案:
    • /application/config/security.php - 很重要!!這是 LimeSurvey(版本 4 及更高版本)中所有加密資料的金鑰
    • /application/config/config.php;
    • /upload 目錄
注意: 如果 /upload/templates 中有任何自訂模板,請確保「更新」這些模板以應對使用新 LimeSurvey 版本所造成的變化。檢查此類變更的最簡單方法是將舊範本與新版本的預設範本進行檔案比較。如果您發現自訂之外的任何差異,則需要更新。
  • 將新檔案從新的 LimeSurvey 套件複製到現有位置。
  • 在瀏覽器開啟管理者介面 (e.g. https://www.example.com/limesurvey/admin) 並檢查是否需要升級資料庫架構。
  • 完成升級後清空您瀏覽器的快取和Cookies

更舊版本的說明

不幸的是,有一些事情需要您再想想,所以請仔細閱讀以下說明。

Upgrading from version 1.50 or later to any later 2.xx version

  • Download the latest version of LimeSurvey
  • Backup your files and database (did we already mention that?).
  • Replace all the installation directory files
    • Delete all old files in the existing installation directory
    • Upload and unpack the new files of the new version into the same installation directory
    • If your previous version is older than 1.90, copy any customized templates to /upload/templates - you will also need to rename each template directory whose name matches an existing template in /templates
    • Copy your /upload directory back to the old location
    • Double-check the permissions set on the directories (write access to /tmp, /upload, and their subdirectories is required) as described in the installation wiki
    • Open http://<yourdomain>/<yourlimesurveydir>/admin in your browser and follow the instructions (You will find the database data in the old config.php). The existing database will be automatically detected and if necessary, upgraded after confirmation.
  • Check if any special manual checks apply as listed below
  • Now, clear your browser cache and cookies and you are good to go
  Attention : 請注意,範本結構隨著從 2.0x 更新到 2.50 或更高版本而變化。您的舊模板將不再起作用,因為模板系統現在使用響應式模板。


Special checks after an upgrade:
  • from any earlier version to 2.xx: Proper question codes are mandatory now. After upgrading the installation, check the survey logic of all surveys and correct the codes where necessary
  • from a version earlier than v1.53: When upgrading from a version before v1.53 to the latest version, please check the global user rights of each user. There was a new superadmin right introduced in v1.53 that can give a user the same privilege as the master administration account created during the installation. The upgrade script is guessing to whom this permission should be given in the older versions. As this is not perfect, it should be carefully checked.
  • from any earlier version to v2.06: From 2.05 to 2.06, some unused permissions when editing global permissions for 'surveys' were activated. For example, if a user had only the 'create' permission in 2.05, the other permissions located to the right of 'create' would also get activated with the update to 2.06 (View/read, Update, Delete, Import, Export). Please check whether the admin users got any other global permissions besides the 'original' ones after the update. If yes, please edit them accordingly.

Upgrading from version 1.50 or later to any later 1.xx version

  • Download the desired version of LimeSurvey
  • Backup your files and database (did we already mention that?).
  • Replace all the installation directory files
    • Delete all old files in the existing installation directory
    • Upload and unpack the new code version into the same installation directory
    • Edit or replace the config.php file:
      • If your previous version was < 1.70: Edit the new config.php in order to reflect the changes from the backup config.php file. Do not just overwrite the new config.php with your old one!
      • If your previous version was >= 1.70: Simply replace the new config.php with your backup config.php file (as the file format has not changed)
    • If your previous version was older than 1.90: Copy any customized templates to /upload/templates - you will also need to rename each template directory whose name matches an existing template in /templates
    • Copy your /upload directory back to the old location
    • Double-check the permissions set on the directories of LimeSurvey (write access to /tmp, /upload, and to their subdirectories is required) as described in the installation wiki
  • Finish the installation/upgrade process
    • Once you open the URL to your LimeSurvey administration, the database tables will be updated after confirmation
    • Remove or rename the /admin/install directory as/if instructed by the installation script
    • Check if any special manual checks apply (as listed below)
升級後的特殊檢查:
  • 從v1.53之前的版本開始:從v1.53之前的版本升級到最新版本時,請檢查每個使用者的全域使用者權限。 v1.53 中引入了新的超級管理者權限,可以為使用者提供與安裝期間建立的主管理帳戶相同的權限。升級程序無法猜測出應該向哪個使用者授予此權限。出於這個原因,請人工指定。

從 v1.50 之前的版本升級(v1.0 到 v1.44)

由於資料結構和許多其他內容發生了變化,從其他更早的版本升級到1.50是不可行。如果您留有*.sql 檔案格式的舊版結構文件,將這些文件轉換為新版本的唯一方法是安裝版本1.50 ,接著匯入 .sql 文件,然後將該問卷版本升級到最新的 LimeSurvey 版本。檢查如何轉移安裝以了解更多詳細資訊。

使用 CLI 升級

您可以透過 PHP CLI 升級資料庫: php application/commands/console.php updatedb。 這允許您透過命令列自動升級系統(例如,在 crontab 中),但不建議這樣做。

手動更新資料庫升級失敗/ComfortUpdate

有時,即使您所做的一切正確,但在資料庫升級過程中總是會發生意外。 可能是因為不同的資料庫版本、意外的資料格式或內容、不尋常的配置或我們的測試中未出現的任何其他內容(是的,我們測試了很多!)

如果您在資料庫更新期間發生錯誤並且您的 LimeSurvey 實例最終處於不可使用的狀態,您希望返回到先前的版本。 這邊預設您仍然擁有資料庫和檔案備份,無論是來自常規備份還是由 Comfortupdate 建立的備份。

請執行以下步驟:

  • 備份現有的 LimeSurvey 目錄和資料庫(是的,再做一次 - 我們叫它第二個備份)
  • 從原來的(第一個備份)還原檔案到現存的資料夾(直接覆蓋它們沒關係)
  • 刪除目前的資料庫然後從(第一個備份)還原資料

就是這樣。一切都應該恢復正常。

關於報告此問題的說明:

如果您遇到這樣的問題,請務必在我們的錯誤追蹤網站裡回報此問題:https://bugs.limesurvey.org

未回報的錯誤就是不會被修復的錯誤。請不要等別人回報此錯誤。如果您發現該錯誤已被回報,您還可以透過在錯誤追蹤器中將其標記為「是的,此錯誤影響我」來幫助提高錯誤的優先順序。

常見問題

即使我有進行中的問卷,我也可以升級嗎?

是的你可以升級。上面的詳細說明中可能會提到例外。我們強烈建議您在升級後測試您的問卷,以確定您設計的模板是否可以正常運作。

如何將*.sql/*.csv問卷結構檔轉換為最新的LimeSurvey版本?

安裝版本 1.50,匯入文件,並將調查結構匯出成為較新的 .csv 格式。然後安裝最新版本 2.x 並匯入 .csv 格式並將其匯出為目前的 .lss 格式。

Survey theme incompatibility

With certain major version updates any custom survey themes will not be compatible, anymore:

  • Update from LimeSurvey 2.6 or lower to LimeSurvey 2.50
  • Update from LimeSurvey 5.x or lower to LimeSurvey 6.x

Error "Multiple primary key defined" when updating MySQL database

If you encounter this error, please check the setting sql_generate_invisible_primary_key in your MySQL server variables. This is most likely set to ON, but should be set to OFF. Then restore your database from the backup (as explained above) and try again.