Actions

Upgrading from a previous version/zh-hans: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
(Updating to match new version of source page)
Line 18: Line 18:
*'''升级之后请清空浏览器缓存与cookies!'''
*'''升级之后请清空浏览器缓存与cookies!'''


<span style='color:#FF0000'>... read this because it is very important: '''Always backup the files and the database of your current installation!!'''</span>
<span style='color:#FF0000'>... read this because it is very important: '''Always backup the files and the database of your current installation!!!'''</span>


You can do this using a database adminstration tool like [http://www.phpmyadmin.net phpMyAdmin] etc. and a file manager! If you don't know how to do this you should better not proceed but ask someone who knows or use the [[ComfortUpdate]] instead.
You can do this using a database administration tool like [http://www.phpmyadmin.net phpMyAdmin] etc. and a file manager! If you don't know how to do this, you should not proceed but ask someone who knows or use the [[ComfortUpdate]] instead.


=The quick way (for minor version changes)=
=The quick way (for minor version changes)=


You can use these instructions if you are doing a minor upgrade  (for example from 2.00 to 2.01)
You can use these instructions if you are doing a minor upgrade (for example from 2.00 to 2.01):
*Backup your files and database (did we already mention that?)
*Backup your files and database ([[Upgrading_from_a_previous_version#Before_you_start... did we already mention that?]])
*Delete all the old files/directory except for
*Delete all the old files/folders except for:
**/application/config/config.php
**/application/config/config.php;
**/upload directory (NOTE: If you have any customized templates sitting under /upload/templates, make sure you refresh those with any changes from the new version. The easiest way to check for such changes is to file-compare your old template with the new version of the default template, and if you see any differences other than your customizations, a refresh is needed.)
**/upload directory - "'NOTE''': If you have any customized templates sitting under /upload/templates, make sure you refresh those with any changes from the new version. The easiest way to check for such changes is to file-compare your old template with the new version of the default template, and if you see any differences other than your customizations, a refresh is needed.
*Copy the new files from the new LimeSurvey package to the existing location.
*Copy the new files from the new LimeSurvey package to the existing location.
* Open the admin page in your brower, e.g. https://www.example.com/limesurvey/admin and check if a database scheme upgrade is necessary.
*Open the admin page in your browser (e.g. https://www.example.com/limesurvey/admin) and check if a database scheme upgrade is necessary.
*'''After the upgrade: Clear your browser cache and cookies!'''
*After the upgrade: '''Clear your browser cache and cookies!'''


=The thorough way (for big version jumps)=
=The thorough way (for big version jumps)=


Unfortunately there are a couple of things to consider, so please scan the following instruction closely.
Unfortunately there are a couple of things to consider, so please observe carefully the following instructions.


==Upgrading from version 2.0x to 2.50 or later==
==Upgrading from version 2.0x to 2.50 or later==
*Please note that the template structure has changed. Your old templates will not be working anymore as the template system is now using responsive templates.
*Please note that the template structure has changed. Your old templates will not be working anymore as the template system is now using responsive templates.


==Upgrading from version 1.50 or later to any later 2.xx version==
==Upgrading from version 2.0 or later to any later 2.xx version==
#[http://www.limesurvey.org#download Download] the latest version of LimeSurvey.
#[http://www.limesurvey.org#download Download] the latest version of LimeSurvey.
# Prepare and backup the old installation
# Prepare and backup the old installation;
## Backup your installation directory files and SQL-based database just in case.
## Backup your installation directory files and SQL-based database just in case;
### At the command-line level, make a '''.zip''' or similar archive of the whole installation directory tree of files. For example in Linux tar cvzf foo.tgz cps100 will tar and zip the whole of the cps100 directory.
### At the command-line level, make a '''.zip''' or similar archive of the whole installation directory tree of files. For example, in Linux 'tar cvzf foo.tgz cps100' will tar and zip the whole of the cps100 directory;
### Using phpMyAdmin or similar to export all tables; or use the according '''LimeSurvey Administration''' button [[File:button-export-sql.png]] to backup the entire database
### Using phpMyAdmin or similar to export all tables; or use the according '''LimeSurvey Administration''' button [[File:button-export-sql.png]] to backup the entire database.
## Copy your '''config.php''' file, modified '''template''' directories and the /upload directory separately for quick access later.
## Copy your '''config.php''' file, modified '''template''' directories and the /upload directory separately for quick access later;
# Replace all the installation directory files
# Replace all the installation directory files;
## Delete all old files in the existing installation directory
## Delete all old files in the existing installation directory;
## Upload and unpack the new code version into the same installation directory
## Upload and unpack the new code version into the same installation directory;
## 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;
## Copy your /upload directory back to the old location
## Double check the '''permissions''' set on the directories (write access to '''/tmp''', '''/upload''' and and their subdirectories is required) as described in the [[Installation#Set_directory_permissions|Installation section]];
## Double check the '''permissions''' set on the directories (write access to '''/tmp''', '''/upload''' and and their subdirectories is required) as described in [[Installation#Set_Directory_permissions|Installation]]
## Open http://<yourdomain>/<yourlimesurveydir>/admin in your browser and follow the instructions (you can use the old config.php as reference). The existing database will be automatically detected and if necessary, upgraded after confirmation.
## Open http://<yourdomain>/<yourlimesurveydir>/admin in your browser and follow the instructions (you can use the old config.php as reference). The existing database will be automatically detected and , if necessary, upgraded after confirmation.
# Check if any special manual checks apply as listed below;
# Check if any special manual checks apply as listed below
# '''Now clear your browser cache and cookies!''' and you are good to go.
# '''Now clear your browser cache and cookies!'''
# You are done (:biggrin:).




{{Alert|title=Attention|text=If you upgrade from e.g. 1.92, it might be necessary to ''first'' upgrade to latest 1.92, then to 2.00, then to 2.06, and then finally to the latest version (e.g. 2.55.x).}}


<div class="simplebox">'''Special checks after an upgrade''':
{{Alert|title=Attention|text=If you upgrade from an earlier version (e.g. 2.0), it might be necessary to ''first'' upgrade to the latest 2.0.x release, then to 2.06, and then finally to the latest version (e.g. 2.67.x).}}
*'''from any earlier version to 2.xx''':
 
**The '''templates''' have been changed in a lot of places. Please check your customized templates if they are still looking right. If not you will have to edit your templates accordingly (check out the original templates to see what was changed). The upgrade process tries to replace the template.js inclusion by the placeholder {TEMPLATEJS}. If you have javascript issue with your custom template, verify if your template have the placeholder {TEMPLATEJS} in startpage.pstpl.
<div class="simplebox">'''For those who update from any earlier version to v2.06''' - some unused permissions when editing global permission for 'surveys' were activated starting with the 2.06 version. So, if a user has any permission besides the 'create', they will be able to apply this additional permission on other surveys then their own. So please check the global permission of admin users that should only be able to see their own surveys and make sure they only have the 'create' permission assigned for 'surveys'.
**Proper question codes are mandatory, now. After upgrade 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 install. The upgrade script is guessing who to give this right to 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 permission for 'surveys' were activated. So if a user has any permission besides the 'create' they will be able to apply this additional permission on other surveys then their own. So please check the global permission of admin users that should only be able to see their own surveys and make sure they only have the 'create' permission assigned for 'surveys'.
</div>
</div>


==Upgrading from version 1.50 or later to any later 1.xx version==
#[http://www.limesurvey.org/download Download] the desired version of LimeSurvey.
# Prepare and backup the old installation
## Backup your installation directory files and SQL-based database just in case.
### At the command-line level, make a '''.zip''' or similar archive of the whole installation directory tree of files. e.g. tar cvzf foo.tgz cps100 will tar and zip the whole of the cps100 directory
### Using phpMyAdmin or similar to export all tables; or using the '''LimeSurvey Administration''' button [[File:button-export-sql.png]] to backup the entire database
## Copy your '''config.php''' file ,modified '''template''' directories and the /upload directory separately for quick access later.
# 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''' to reflect changed settings in 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''' (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 (write access to '''/tmp''', '''/upload''' and and their subdirectories is required) as described in [[Installation#Set Directory permissions|Installation]]
# Finishing the installation
## 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
# You are done (:biggrin:). If you notice any problems after the upgrade: Clear your browser cache and cookies!
<div class="simplebox">'''Special checks after an upgrade''':
*'''from any earlier version to 1.92''': The '''templates''' have been changed in a lot of places. Please check your customized templates if they are still looking right. If not you will have to edit your templates accordingly (check out the original templates to see what was changed)<br />
*'''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 who to give this right to in the older versions.  As this is not perfect, it should be carefully checked.</div>
==Upgrading from a version earlier than v1.50 (v1.0 through 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 a *.sql extension the only way to get these into a newer version is to install [http://www.limesurvey.org/en/archived-releases/289-limesurvey150zip version 1.50], import the .sql file(s) there, then upgrade that version to the most recent LimeSurvey version. See the also then page [[Transferring an installation]] for more details.


=Upgrade FAQ=
==What is the most recent LimeSurvey version that still supports PHP4?==
 
==What is the most actual LimeSurvey version that still supports PHP4?==


The last release offering PHP4 support was version 1.82+.
The last release offering PHP4 support was version 1.82+.
Line 108: Line 71:


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.
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.
==What is best way to port LimeSurvey *.sql survey structure files to the latest version?==
=升级常见问题=
==支持PHP4的LimeSurvey最高版本是哪个?==
最后一个支持PHP4的版本是1.82+。
==我有活动的问卷,是否可以执行升级?==
可以。上面已经对一些特殊情况进行了说明。我们强烈建议在升级后测试一下问卷,以确认你的模板能够正常显示与使用。

Revision as of 10:10, 11 August 2017

Additional pages:{toc}

开始之前...

... 请仔细阅读本信息,这非常重要: 记得在升级之前将当前的文件与数据库做好备份!!

你可以用 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 etc. and a file manager! If you don't know how to do this, you should not proceed but ask someone who knows or use the ComfortUpdate instead.

The quick way (for minor version changes)

You can use these instructions if you are doing a minor upgrade (for example from 2.00 to 2.01):

  • Backup your files and database (Upgrading_from_a_previous_version#Before_you_start... did we already mention that?)
  • Delete all the old files/folders except for:
    • /application/config/config.php;
    • /upload directory - "'NOTE: If you have any customized templates sitting under /upload/templates, make sure you refresh those with any changes from the new version. The easiest way to check for such changes is to file-compare your old template with the new version of the default template, and if you see any differences other than your customizations, a refresh is needed.
  • Copy the new files from the new LimeSurvey package to the existing location.
  • Open the admin page in your browser (e.g. https://www.example.com/limesurvey/admin) and check if a database scheme upgrade is necessary.
  • After the upgrade: Clear your browser cache and cookies!

The thorough way (for big version jumps)

Unfortunately there are a couple of things to consider, so please observe carefully the following instructions.

Upgrading from version 2.0x to 2.50 or later

  • Please note that the template structure has changed. Your old templates will not be working anymore as the template system is now using responsive templates.

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

  1. Download the latest version of LimeSurvey.
  2. Prepare and backup the old installation;
    1. Backup your installation directory files and SQL-based database just in case;
      1. At the command-line level, make a .zip or similar archive of the whole installation directory tree of files. For example, in Linux 'tar cvzf foo.tgz cps100' will tar and zip the whole of the cps100 directory;
      2. Using phpMyAdmin or similar to export all tables; or use the according LimeSurvey Administration button to backup the entire database.
    2. Copy your config.php file, modified template directories and the /upload directory separately for quick access later;
  3. Replace all the installation directory files;
    1. Delete all old files in the existing installation directory;
    2. Upload and unpack the new code version into the same installation directory;
    3. Copy your /upload directory back to the old location;
    4. Double check the permissions set on the directories (write access to /tmp, /upload and and their subdirectories is required) as described in the Installation section;
    5. Open http://<yourdomain>/<yourlimesurveydir>/admin in your browser and follow the instructions (you can use the old config.php as reference). The existing database will be automatically detected and if necessary, upgraded after confirmation.
  4. Check if any special manual checks apply as listed below;
  5. Now clear your browser cache and cookies! and you are good to go.


  Attention : If you upgrade from an earlier version (e.g. 2.0), it might be necessary to first upgrade to the latest 2.0.x release, then to 2.06, and then finally to the latest version (e.g. 2.67.x).


For those who update from any earlier version to v2.06 - some unused permissions when editing global permission for 'surveys' were activated starting with the 2.06 version. So, if a user has any permission besides the 'create', they will be able to apply this additional permission on other surveys then their own. So please check the global permission of admin users that should only be able to see their own surveys and make sure they only have the 'create' permission assigned for 'surveys'.


What is the most recent LimeSurvey version that still supports PHP4?

The last release offering PHP4 support was version 1.82+.

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.