Actions

Upgrading from a previous version/ru: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
(Updating to match new version of source page)
Line 5: Line 5:
<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 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.
You can do this using a database administration tool like [httsp://www.phpmyadmin.net phpMyAdmin] and a file manager! If you don't know how to do this, you should not proceed further and ask someone who knows or use the [[ComfortUpdate]] instead.


=Быстрый способ(для обновления с минорных версий)=
=Быстрый способ(для обновления с минорных версий)=


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 ([[Upgrading_from_a_previous_version#Before_you_start... 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/folders 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 that come with the new LimeSurvey version. The easiest way to check for such changes is to file-compare your old template with the new version of the default template. 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 browser (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!'''


=Тщательный способ (для серьезных обновлений)=
=Тщательный способ (для серьезных обновлений)=


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


==Upgrading from version 2.0x to 2.50 or later==
==Upgrading from version 1.50 or later to any later 2.xx version==
*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.
#[https://www.limesurvey.org#download Download] the latest version of LimeSurvey.
 
# Prepare and backup the old installation:
==Upgrading from version 2.0 or later to any later 2.xx version==
## Backup your installation directory files and SQL-based database just in case:
#[http://www.limesurvey.org#download Download] the latest 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. 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.
### You can use [httsp://www.phpmyadmin.net phpMyAdmin] to export all tables or you can use the backup database function of LimeSurvey that is available in the Configuration dialog (under the Advanced tab) to backup the entire database; ''Note: Look for the '''LimeSurvey Administration''' button [[File:button-export-sql.png]] to export the database in the older LimeSurvey versions;''
## 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 the [[Installation#Set directory permissions|installation wiki]];
## 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!''' and you are good to go.


{{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).}}


{{Alert|title=Attention|text=Please note that the template structure has changed with the update from 2.0x to 2.50 or later. Your old templates will not be working anymore as the template system is now using responsive templates.}}


{{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).}}
<div class="simplebox">'''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 install. The upgrade script is guessing to whom should be given this permission 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 on 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.
</div>


<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'.
==Обновление с версии 1.50 или позже до любой версии 1.xx или позже==
</div>
#[http://www.limesurvey.org/download Скачайте] желаемую версию LimeSurvey.
#Сделайте резервную копию старой системы.
##Сделайте копии файлов из каталога с установленной системой и, на всякий случай, сделайте дамп базы данных.
###В командной строке извлеките все файлы и каталоги из скачанного архива.
###С помощью phpMyAdmin или любым другим аналогичным способом произведите экспорт всех таблиц; или воспользуйтесь кнопкой в '''LimeSurvey административной панели''' [[File:button-export-sql.png]], чтобы сделать резервную копию базы данных
##Скопируйте Ваш '''config.php''' файл, измененный '''шаблон''' директории и папку /upload отдельно для быстрого доступа позднее.
#Замените все установочные папки и файлы
##Удалите все старые файлы в существующей директории установки
##Выгрузите и распакуйте новую версию кода в ту же папку
##Отредактируйте или замените файл '''config.php''':
###Если Ваша старая версия была < 1.70: Отредактируйте новый '''config.php''' чтобы установить измененные значения как в старом '''config.php'''. '''Не перезаписывайте новый файл '''config.php''' старым!!!'''
###Если Ваша старая версия была >= 1.70: Просто замените новый '''config.php''' старым '''config.php''' из бэкапа (т.к. формат файла не изменился).
##Если Ваша старая версия была старше чем 1.90:  скопируйте настроенные шаблоны в /upload/templates - Вам вскоре потребуется переименовать каждую директорию с шаблоном, чьи имена совпадают с существующими шаблонами в папке /templates.
##Скопируйте Вашу директорию /upload обратно на старое место
##Проверьте '''разрешения''' установленные на директории (доступ на запись для '''/tmp''', '''/upload''' и их дочерние каталоги если требуется) как было описано в [[Installation#Set_Directory_permissions|установке]]
##Завершение установки
##После того, как Вы перейдете по ссылке на Ваш LimeSurvey административную часть, таблицы базы данных будут обновлены после подтверждения.
#Удалите или переименуйте каталог '''/admin/install''' как в инструкции по установке скрипта.
##Проконтролируйте на предмет наличия специальных ручных проверок среди перечисленных ниже:
# Все готово! (:biggrin:). Если появились любые примечания после обновления: очистите кэш браузера и куки!
 
<div class="simplebox">'''Специальные проверки после обновления''':
*'''с любой ранней версии до 1.92''': '''шаблоны''' были изменены во множестве мест. Проверьте Ваши настроенные шаблоны на корректность отображения. Если нет, то исправьте их (согласно имеющимся стандартным шаблонам).
*'''с версии младше чем v1.53''': При обновлении с версии младше v1.53 до последней версии, пожалуйста, проверьте '''глобальные права пользователей''' для каждого. Если там уже был '''superadmin''' введенный в  v1.53, то это может дать пользователю те же привилегии, что и у главного аккаунта администратора созданного во время установки. Скрипт обновления пытается догадаться, кому дать подобные права в старой версии системы. Т.к. он не совершенен, то результат его деятельности должен быть проверен.</div>
 
==Обновление с версии младше чем 1.50 (v1.0-v1.44)==
 
Постольку поскольку структура данных и множество других вещей были изменены, '''обновление с любой версии до v1.50 не представляется возможным'''. Если же у Вас есть старая структура данных в *.sql файле, то импортировать ее в новую версию можно установив [http://www.limesurvey.org/en/archived-releases/289-limesurvey150zip версию 1.50], произвести импорт туда *.sql файла и затем обновив систему до самой свежей версии LimeSurvey. Также смотрите страницу [[Transferring an installation|Перенос установки]] для получения детальной информации.


=Обновление: часто задаваемые вопросы=


==What is the most recent LimeSurvey version that still supports PHP4?==
==What is the most recent LimeSurvey version that still supports PHP4?==
Line 56: Line 90:


Да, Вы можете. Исключения в данном случае указаны в указанной выше инструкции. Мы настоятельно рекомендуем проверить Ваши шаблоны на работоспособность.
Да, Вы можете. Исключения в данном случае указаны в указанной выше инструкции. Мы настоятельно рекомендуем проверить Ваши шаблоны на работоспособность.
==Какой самый лучший способ портирования структуры *.sql файлов в последнюю версию LimeSurvey?==
Установить версию 1.50, импортировать файл и экспортировать структуру опросов в новый .csv формат. Последняя версия сможет прочитать структуру опроса в .csv формате.

Revision as of 15:35, 11 August 2017

Дополнительные страницы:{toc}

__ОГЛАВЛЕНИЕ__

Перед началом...

... 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 [httsp://www.phpmyadmin.net phpMyAdmin] and a file manager! If you don't know how to do this, you should not proceed further and ask someone who knows or use the ComfortUpdate instead.

Быстрый способ(для обновления с минорных версий)

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?).
  • 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 that come with the new LimeSurvey version. The easiest way to check for such changes is to file-compare your old template with the new version of the default template. 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!


Тщательный способ (для серьезных обновлений)

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

Upgrading from version 1.50 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. You can use [httsp://www.phpmyadmin.net phpMyAdmin] to export all tables or you can use the backup database function of LimeSurvey that is available in the Configuration dialog (under the Advanced tab) to backup the entire database; Note: Look for the LimeSurvey Administration button to export the database in the older LimeSurvey versions;
    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. 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.
    4. Copy your /upload directory back to the old location;
    5. Double check the permissions set on the directories (write access to /tmp, /upload and and their subdirectories is required) as described in the installation wiki;
    6. 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 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).


  Attention : Please note that the template structure has changed with the update from 2.0x to 2.50 or later. Your old templates will not be working anymore as the template system is now using responsive templates.


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 install. The upgrade script is guessing to whom should be given this permission 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 on 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.

Обновление с версии 1.50 или позже до любой версии 1.xx или позже

  1. Скачайте желаемую версию LimeSurvey.
  2. Сделайте резервную копию старой системы.
    1. Сделайте копии файлов из каталога с установленной системой и, на всякий случай, сделайте дамп базы данных.
      1. В командной строке извлеките все файлы и каталоги из скачанного архива.
      2. С помощью phpMyAdmin или любым другим аналогичным способом произведите экспорт всех таблиц; или воспользуйтесь кнопкой в LimeSurvey административной панели , чтобы сделать резервную копию базы данных
    2. Скопируйте Ваш config.php файл, измененный шаблон директории и папку /upload отдельно для быстрого доступа позднее.
  3. Замените все установочные папки и файлы
    1. Удалите все старые файлы в существующей директории установки
    2. Выгрузите и распакуйте новую версию кода в ту же папку
    3. Отредактируйте или замените файл config.php:
      1. Если Ваша старая версия была < 1.70: Отредактируйте новый config.php чтобы установить измененные значения как в старом config.php. Не перезаписывайте новый файл config.php старым!!!
      2. Если Ваша старая версия была >= 1.70: Просто замените новый config.php старым config.php из бэкапа (т.к. формат файла не изменился).
    4. Если Ваша старая версия была старше чем 1.90: скопируйте настроенные шаблоны в /upload/templates - Вам вскоре потребуется переименовать каждую директорию с шаблоном, чьи имена совпадают с существующими шаблонами в папке /templates.
    5. Скопируйте Вашу директорию /upload обратно на старое место
    6. Проверьте разрешения установленные на директории (доступ на запись для /tmp, /upload и их дочерние каталоги если требуется) как было описано в установке
    7. Завершение установки
    8. После того, как Вы перейдете по ссылке на Ваш LimeSurvey административную часть, таблицы базы данных будут обновлены после подтверждения.
  4. Удалите или переименуйте каталог /admin/install как в инструкции по установке скрипта.
    1. Проконтролируйте на предмет наличия специальных ручных проверок среди перечисленных ниже:
  5. Все готово! (:biggrin:). Если появились любые примечания после обновления: очистите кэш браузера и куки!
Специальные проверки после обновления:
  • с любой ранней версии до 1.92: шаблоны были изменены во множестве мест. Проверьте Ваши настроенные шаблоны на корректность отображения. Если нет, то исправьте их (согласно имеющимся стандартным шаблонам).
  • с версии младше чем v1.53: При обновлении с версии младше v1.53 до последней версии, пожалуйста, проверьте глобальные права пользователей для каждого. Если там уже был superadmin введенный в v1.53, то это может дать пользователю те же привилегии, что и у главного аккаунта администратора созданного во время установки. Скрипт обновления пытается догадаться, кому дать подобные права в старой версии системы. Т.к. он не совершенен, то результат его деятельности должен быть проверен.

Обновление с версии младше чем 1.50 (v1.0-v1.44)

Постольку поскольку структура данных и множество других вещей были изменены, обновление с любой версии до v1.50 не представляется возможным. Если же у Вас есть старая структура данных в *.sql файле, то импортировать ее в новую версию можно установив версию 1.50, произвести импорт туда *.sql файла и затем обновив систему до самой свежей версии LimeSurvey. Также смотрите страницу Перенос установки для получения детальной информации.

Обновление: часто задаваемые вопросы

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

Последний релиз поддерживающий PHP4 начинается от версии 1.82+.

Могу ли я обновиться в то время как у меня есть активные опросы?

Да, Вы можете. Исключения в данном случае указаны в указанной выше инструкции. Мы настоятельно рекомендуем проверить Ваши шаблоны на работоспособность.

Какой самый лучший способ портирования структуры *.sql файлов в последнюю версию LimeSurvey?

Установить версию 1.50, импортировать файл и экспортировать структуру опросов в новый .csv формат. Последняя версия сможет прочитать структуру опроса в .csv формате.