版本升级
From LimeSurvey Manual
开始之前...
... 请仔细阅读本信息,这非常重要: 记得在升级之前将当前的文件与数据库做好备份!!
你可以用 phpMyAdmin 和文件管理器等工具进行备份工作。如果不确定如何进行备份,最好找个懂备份的人,或者使用 ComfortUpdate 进行舒适更新。
快速升级(适用于小版本更新)
以下步骤适用于小版本更新(如1.86到1.87)
- 备份文件与数据库(上面说过一次了)
- 删除旧文件和目录,但以下三个别删:
- /config.php
- /templates 目录
- /upload 目录
- 将新版LimeSurvey软件包中的内容复制到当前目录下。注意别把 config.php 覆盖了(就算不小心误操作,你也应该有这个文件的备份吧)。其他的都可以覆盖。
- 升级之后请清空浏览器缓存与cookies!
... read this because it is very important: Always backup the files and the database of your current installation!
You can do this using a database administration tool like phpMyAdmin and a file manager! If you don't know how to do this, you should not proceed further and ask someone who knows.
Recommendation to use ComfortUpdate
The easiest/safest way to upgrade is to use our ComfortUpdate service.
Upgrade instructions (from 2.x or newer to any later version)
Please follow these steps:
- Log out of the administration
- Backup your files and database
- Delete all the old files/folders except for:
- /application/config/security.php - Important!! This is the key to all encrypted data in LimeSurvey (version 4 and later)
- /application/config/config.php;
- /upload directory
- Copy the new files from the new LimeSurvey package to the existing location.
- Now clear your browser cache and cookies.
- Open the admin page in your browser (e.g. https://www.example.com/limesurvey/admin). If a database scheme upgrade is necessary you will be prompted to confirm it.
- Done!
Upgrading using 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.
Please execute the following steps:
- Backup the existing LimeSurvey directory and database (yes, again - we will call this the 2nd backup)
- Restore files to the existing directory (just overwriting them is fine) from the original (1st) backup.
- Delete the old database and restore the database from the original (1st) backup.
That's it. Everything should be back to normal.
A note about reporting this issue:
If you run into a problem like this, please always report this in our bug tracker at https://bugs.limesurvey.org
A bug not reported is a bug not fixed. Please don't just rely on other people reporting it. If you see that the bug is already reported, you can also help to raise the bug priority by marking it as 'Yes, this bug affects me' in the bug tracker.
FAQ
Can I upgrade even if I have active surveys?
Yes, you can. Exceptions may be mentioned in the thorough instructions above. We strongly advise to test your surveys after upgrade to check if your design templates still work alright.
How to convert *.sql/*.csv survey structure files to the latest LimeSurvey version?
升级常见问题
支持PHP4的LimeSurvey最高版本是哪个?
最后一个支持PHP4的版本是1.82+。
我有活动的问卷,是否可以执行升级?
可以。上面已经对一些特殊情况进行了说明。我们强烈建议在升级后测试一下问卷,以确认你的模板能够正常显示与使用。
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.