從先前的版本升級
From LimeSurvey Manual
開始之前...
....閱讀此內容,因為它非常重要:務必備份目前的安裝檔案和資料庫!
您可以使用資料庫管理工具例如 phpMyAdmin 和檔案管理器來執行此操作! 如果您不知道怎麼備份,請勿繼續下面的操作並尋找其他人的幫助。
建議使用 ComfortUpdate
最簡單/安全的升級方法就是使用我們的ComfortUpdate服務。
升級說明(從2.x或更高版本到任何之後的版本)
請按照以下說明操作:
- 備份您的檔案和資料庫(我們之前有提過嗎?)。
- 刪除所有舊文件/資料夾,除了以下檔案:
- /application/config/security.php - 很重要!!這是 LimeSurvey(版本 4 及更高版本)中所有加密資料的金鑰
- /application/config/config.php;
- /upload 目錄
![](/images/a/aa/Help.png)
- 將新檔案從新的 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
- 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)
- 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 install. 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.
從 v1.50 之前的版本升級(v1.0 到 v1.44)
Since the data structure and a lot of other things were changed, upgrading from any version previous to v1.50 is NOT possible. If you have old survey structure files with an *.sql extension, the only way to get these into a newer version is to install version 1.50, import the .sql file(s) there, then upgrade that version to the most recent LimeSurvey version. Check the page related to how an installation can be transferred for more details.
使用 CLI 升級
You can upgrade the database via the PHP CLI: php application/commands/console.php updatedb
. This allows you to set up an auto-upgrade system via command line (for example, in a crontab), although it is not recommended.
Failed database upgrade after manual update/ComfortUpdate
Sometimes, even though you did everything correct, things don't work out they are supposed to during database upgrade. That may happen because of various reasons: Different database versions, unexpected data formats or contents, unusual configurations or anything else that did not show up in our tests (yes, we test a lot!)
If you have an error during database update and your LimeSurvey instance ends up in an unusable state, you want to go back to the previous version. This assumes that you still have the database and file backup, either from your regular backup or the one created by 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.