Actions

Installation FAQ/ru: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
(Updating to match new version of source page)
Line 4: Line 4:
=Installation on your computer=
=Installation on your computer=


LimeSurvey can be installed on your computer with MAMP/XAMP or any other system. But your computer is not a web server : it's not accessible via web by other user.  
LimeSurvey can be installed on your computer with MAMP/XAMP or any other system. But your computer is not a web server - it's not accessible via web to any other user.  


Then if you want to spread your survey on the web : you have to  
In order to make your survey reachable to other users via the web, you need to either:


* own a server  
* own a server or a web space from a host provider;
* or a web space at a hoster
* or find a LimeSurvey-specialized host provider.
* find a LimeSurvey instance specialized hoster


{{Alert|Installation on your computer is not done to share your survey on internet.}}
{{Alert|An installation on your computer is not done to share your survey on internet!}}


=Во время установки=
=Starting installation=


==Как я могу создать базу данных и пользователя базы с помощью командной строки?==
==How can I create a database and a user in MySQL with command line access?==


Вам необходимо ввести приведенные ниже команды в консоль MySQL.
You have to enter the below commands in your MySQL:


create database '''<your_database_name>''';
*<code>create database '''<your_database_name>''';</code>


create user '''<your_database_username>''';
*<code>create user '''<your_database_username>''';</code>


create user '''<your_database_username>'''@localhost;
*<code>create user '''<your_database_username>'''@localhost;</code>


set password for '''<your_database_username>''' = PASSWORD(''''<your_database_password>'''');
*<code>set password for '''<your_database_username>''' = PASSWORD(''''<your_database_password>'''');</code>


set password for '''<your_database_username>'''@localhost = PASSWORD(''''<your_database_password>'''');
*<code>set password for '''<your_database_username>'''@localhost = PASSWORD(''''<your_database_password>'''');</code>


grant all on '''<your_database_name>'''.* to ''''<your_database_username>'''';
*<code>grant all on '''<your_database_name>'''.* to ''''<your_database_username>'''';</code>


grant all on '''<your_database_name>'''.* to ''''<your_database_username>''''@'localhost';
*<code>grant all on '''<your_database_name>'''.* to ''''<your_database_username>''''@'localhost';</code>


Вам необходимо подменить данные: '''<your_database_name>''', '''<your_database_username>''' и '''<your_database_password>''' в приведенных командах на свои значения.
In terminal, <code>'''<your_database_name>'''</code>, <code>'''<your_database_username>'''</code>, and <code>'''<your_database_password>'''</code> have to be replaced with the according/desired values.


==Что делать, если не получается создать базу данных с помощью скрипта?==
==Что делать, если не получается создать базу данных с помощью скрипта?==


Обычно, новую базу данных и структуру таблиц создает скрипт. Однако, если Ваш провайдер/сервер не дает Вам прав на создание базы данных в MySQL, то Ван нужно связаться с системным администратором для создания необходимой базы (или создать ее самостоятельно). Они должны создать пустую базу данных для Вас с соответствующими правами доступа (т.е.: чтение/запись/создание). Начните обычную установку LimeSurvey и система создаст таблицы в существующей базе.
Normally, the script creates a new database, and then the table structure. However, if your server/ISP doesn't give you admin rights to create a new database in MySQL, you will need to contact your server administrator to get the necessary database created (or create it yourself if you receive the required permissions). The newly created blank database should include the appropriate access rights (i.e.: read/write/create). Then, you should be able start the LimeSurvey installation, which will create the tables within the newly created database.


==При попытке открыть страницу установки вижу пустую страницу==
==При попытке открыть страницу установки вижу пустую страницу==


Здесь проблема не совсем в LimeSurvey, а в настройках установленного PHP.
The problem is not with the LimeSurvey installation but with the PHP installation.
*Проверьте наличие установленного модуля PHP для поддержки работы с MySQL (php-mysql).
*Verify you have the MySQL PHP module (php-mysql) installed.
*Проверьте Ваш установленный PHP на загрузку php.ini-файла, который Вы изменили и не проверяет ли он какие либо другие php.ini-файлы в Вашей системе.
*Verify your PHP install is loading the PHP.ini file your are modifying and not parsing other PHP.INI files on your system.
*Проверьте расположение и разрешения для Вашего файла php.ini
*Verify the location and permissions of the following setting in your PHP.ini:


<syntaxhighlight lang="c" enclose="div">upload_tmp_dir="/temp"
<syntaxhighlight lang="c" enclose="div">upload_tmp_dir="/temp"


session.save_path="/temp"</syntaxhighlight>
session.save_path="/temp"</syntaxhighlight>
*Проверьте версию запущенного PHP (т.е. "пустая страница" может быть связана с PHP v4.4 и LimeSurvey v2.00+).
*Verify if your server runs a suitable PHP version.


==Сообщения об ошибках о несуществующих ресурсах==
==Сообщения об ошибках о несуществующих ресурсах==


Иногда случается так, что файлы не выгружаются корректно или повреждаются во время данного процесса. Это может приводить к различного рода сообщениям об ошибках. Большинство из них относятся к функциям находящимся в файле, который не может быть найден.
Sometimes, files are not uploaded correctly or were broken during the upload process. This leads to several different error messages. Most of them refer to a file or function within a file which can't be found.


'''Решение:''' Загрузите файлы заново используя FTP-клиент в бинарном режиме.
'''Решение:''' Загрузите файлы заново используя FTP-клиент в бинарном режиме.
Line 60: Line 59:
=Requirements page=
=Requirements page=


==Зачем нужна библиотека mbstring (Multibyte String Functions)?==
==What is the mbstring (Multibyte String Functions) library?==


Mbstring это PHP-библиотека, которая преобразовывает кодировки разных языков из одной в другую. Она понадобится, если Вы хотите развернуть у себя LimeSurvey. Чтобы проверить, установлена ли данная библиотека, перейдите по ссылке
The mbstring library is a PHP library that can convert char sets from one language to another. You need it if you want to run LimeSurvey. To check if it is already installed, open the URL from an web browser:


<nowiki>http://<ваш_сервер>/<ваш_limesurvey_каталог>/admin/install/phpinfo.php</nowiki>
<nowiki>http://<your_server>/<your_limesurvey_directory>/admin/install/phpinfo.php</nowiki>


в браузере. Будет отображено великое множество информации. В секции '''Конфигурация''' найдите строку 'mbstring'.
A lot of information will be shown. Search for the string 'mbstring' under the '''Configuration''' section. If you find the mbstring section then all should be well and you can continue on with your LimeSurvey installation!


Если такая строка найдена, то можете смело продолжать установку.
'''If you don't find the mbstring section''', you might have a problem on your hands. There are three possible scenarios:
 
*If it's your host provider's server, ask for the activation of that extension in PHP or further information on how you can activate it - if you have a good administration panel for your server, you may be able to activate it yourself;
'''Если строка mbstring не найдена''', то Вы можете получить кучу проблем.
*If it's your own '''Linux''' server, you may have to re-compile PHP and include the mbstring library. Ask the Linux experts how to do that. However, you can install it using your Linux package manager, which is mostly available in all Linux distributions nowadays;
 
**If you are using a version of Linux that supports 'yum' (CentOS, RedHat, Fedora):
Три возможных сценария развития событий:
***Use the terminal (as a super user) and type: '''yum install php-mbstring''';
*Если Вы пользуетесь услугой сервис-провайдера(система находится на внешнем хостинге): то поинтересуйтесь у него как можно активировать данную библиотеку в PHP или же пусть он сам ее активирует - если у Вас достаточно мощная панель управления хостингом, то Вы можете самостоятельно сделать это.
***Make sure to update /etc/php.ini and uncomment the various mbstring params;
*Если система развернута на Вашем личном сервере '''Linux''': Вы можете произвести повторную компиляцию PHP, включив в него библиотеку mbstring. Спросите у людей разбирающихся в Linux как сделать это. В большинстве версий Linux имеющихся на сегодня Вы можете установить все с помощью менеджера пакетов.
***Make sure to restart apache after installing it: '''/etc/init.d/httpd restart''';
**Если Вы пользуетесь системой на базе пакетов поддерживающих 'yum' (CentOS, RedHat, Fedora):
*If it's your own '''Windows''' server, search for php.ini on your system, open it with an editor and search for mbstring. Most probably, the line that contains that string is commented out with a semicolon. Remove the semicolon, save, and restart your web server.
###Используйте терминал (от root-а) и введите: '''yum install php-mbstring'''
###Убедитесь в том что обновился файл /etc/php.ini и в нем имеются строки с параметрами mbstring (без комментариев в начале строки).
###Убедитесь, что перезагрузили apache после установки: '''/etc/init.d/httpd restart'''
*Если же все развернуто на Вашем сервере '''Windows''': Найдите php.ini в Вашей системе, откройте его любым редактором и найдите mbstring. Скорее всего большинство строк с данным словом будет закомментировано и Вам необходимо будет раскомментировать их. Удалите тточку с запятой, сохраните файл и перезагрузите web-сервер.


== Stuck at checking file system permissions ==
== Stuck at checking file system permissions ==
If SELinux is activated (primarily on CentOS) then you might get an error that the file system permissions are not correct but the list of directories is empty. SELinux prevents writing even though the permissions are on e.g. 777 or 755.
If SELinux is activated (primarily on CentOS), then you might get an error that the file system permissions are not correct, even if the list of directories is empty. SELinux prevents writing even though the permissions are on for example on 777 or 755. To configure SELinux correctly for your server - check out the [https://wiki.centos.org/HowTos/SELinux SELinux documentation].
You need to configure SELinux for your server correctly - check out the [https://wiki.centos.org/HowTos/SELinux SELinux documentation].


=После создания базы данных=
=После создания базы данных=
Line 89: Line 83:
==Пустая страница после создания базы данных==
==Пустая страница после создания базы данных==


===Симптомы===
===Symptoms===
* LimeSurvey установлен, база создана, но при переходе на web-страницу получаем пустую страницу
* LimeSurvey installed OK, and database was created, but instead of the admin page, you get an empty page
* Лог Web-сервера содержит записи "Fatal error: Call to a member function on a non-object in /path/to/limesurvey/admin/login_check.php on line 69"
* Web server log shows "Fatal error: Call to a member function on a non-object in /path/to/limesurvey/admin/login_check.php on line 69"


===Исправление===
===Исправление===


Скорее всего это некорректные значение параметров $rooturl или $rootdir в файле config.php. Обычно config.ini пытается установить корректный $rootdir с помощью вызова <nowiki>dirname('''FILE''')</nowiki> и зачастую это работает, но бывают сбои, если LimeSurvey установлен в домашний каталог пользователя или смонтированную по NFS папку. Попробуйте задать данный параметр вручную. Путь Вам может указать команда pwd в командной строке, наподобие "/disks/hostname/home/username/public_html/limesurvey", попробуйте воспользоваться "/home/username/public_html/limesurvey".
This is probably related to an incorrect setting for <code>$rooturl</code> or <code>$rootdir</code> in config.php. The file config.php attempts to set <code>$rootdir</code> correctly by calling <code><nowiki>dirname('''FILE''')</nowiki></code>. While this usually works, it can be upset when LimeSurvey is installed in a user's home or public_html directory and the home directory is mounted over NFS. To set up manually the <code>$rootdir</code>, (your shell or pwd command may show you a path like "/disks/hostname/home/username/public_html/limesurvey"), try using "/home/username/public_html/limesurvey".


==При попытке перехода на страницу администратора браузер постоянно загружает ее и ничего не показывает==
==When accessing the admin page, the browser keeps running and will eventually fail to show it==


===Симптомы===
===Symptoms===
* LimeSurvey установлен, база данных создана, но при переходе на страницу администратора браузер постоянно загружает страницу и в итоге ничего не показывает
* LimeSurvey installed OK and the database was created. But when you access the admin page, the browser keeps running and will eventually fail to show the page.
* Когда Вы проверяете access.log на Web-сервере, то его размер оказывается очень большим (в некоторых случаях более чем 2GiB).
* When you check the web server access log, its size has become quite big (in some cases, more than 2 GB).
* В файле access.log Вы видите одно и то же сообщение повторяющееся многократно
* Inside the access log, you get this message filling the log:


Warning: fread() [function.fread]: Length parameter must be greater than 0 in /limesurvey/classes/php-gettext/streams.php on line 120
{{Alert|title=Warning|text=''fread() [function.fread]: Length parameter must be greater than 0 in /limesurvey/classes/php-gettext/streams.php on line 120.}}''


''Примечание:'' номер строки может отличаться в зависимости от версии LimeSurvey.
{{Note|The line number may be different depending on your LimeSurvey version.}}


===Исправление===
===Исправление===
Line 114: Line 108:
mbstring.func_overload = 0
mbstring.func_overload = 0


''Примечание:'' это отключает перегрузку функций. Дополнительную документацию можно посмотреть в разделе  [http://us3.php.net/manual/en/mbstring.overload.php Перегрузка функций]
{{Note|This means no function overloading. See the PHP manual for this setting: [http://us3.php.net/manual/en/mbstring.overload.php Function Overloading Feature].}}


==При попытке доступа к странице администратора браузер показывает ошибку Fatal error: Call to a member function gT() on a non-object in login_check.php on line 76==
==При попытке доступа к странице администратора браузер показывает ошибку Fatal error: Call to a member function gT() on a non-object in login_check.php on line 76==


===Симптомы===
===Symptoms===
* LimeSurvey установлен, база создана, но браузер показывает данную ошибку.
* LimeSurvey installed OK and database was created. But when redirected to the admin page, the browser displayed the the listed error.
* $rootdir и $rooturl указаны верно в файле config.php.
* <code>$rootdir</code> and <code>$rooturl</code> are correctly set in config.php.
* В пути к папке с файлами LimeSurvey присутствуют символы: ()+
* The disk path name for limesurvey installation directory includes one of the following characters: '''(''',''')''' or '''+'''.


''Примечание:'' другие символы могут вызывать аналогичное поведение
{{Note|Other characters may also induce the same behaviour.}}


===Исправление===
===Исправление===


Переместите или переименуйте папку с установленными файлами LimeSurvey, чтобы в пути к ней отсутствовали символы '''(''' или ''')'''
Move/rename the limesurvey installation directory so that the path name includes non of the following characters: '''(''', ''')''' or '''+''' characters.


=После установки=  
=После установки=  


По вопросам возникающим после успешной установки LimeSurvey обращайтесь в раздел [[Troubleshooting|Устранение неполадок]].
For all issues happening after a successful installation, please refer to the [[Troubleshooting]] page.

Revision as of 15:10, 7 August 2017

Содержание:

Installation on your computer

LimeSurvey can be installed on your computer with MAMP/XAMP or any other system. But your computer is not a web server - it's not accessible via web to any other user.

In order to make your survey reachable to other users via the web, you need to either:

  • own a server or a web space from a host provider;
  • or find a LimeSurvey-specialized host provider.
  An installation on your computer is not done to share your survey on internet!


Starting installation

How can I create a database and a user in MySQL with command line access?

You have to enter the below commands in your MySQL:

  • create database <your_database_name>;
  • create user <your_database_username>;
  • create user <your_database_username>@localhost;
  • set password for <your_database_username> = PASSWORD('<your_database_password>');
  • set password for <your_database_username>@localhost = PASSWORD('<your_database_password>');
  • grant all on <your_database_name>.* to '<your_database_username>';
  • grant all on <your_database_name>.* to '<your_database_username>'@'localhost';

In terminal, <your_database_name>, <your_database_username>, and <your_database_password> have to be replaced with the according/desired values.

Что делать, если не получается создать базу данных с помощью скрипта?

Normally, the script creates a new database, and then the table structure. However, if your server/ISP doesn't give you admin rights to create a new database in MySQL, you will need to contact your server administrator to get the necessary database created (or create it yourself if you receive the required permissions). The newly created blank database should include the appropriate access rights (i.e.: read/write/create). Then, you should be able start the LimeSurvey installation, which will create the tables within the newly created database.

При попытке открыть страницу установки вижу пустую страницу

The problem is not with the LimeSurvey installation but with the PHP installation.

  • Verify you have the MySQL PHP module (php-mysql) installed.
  • Verify your PHP install is loading the PHP.ini file your are modifying and not parsing other PHP.INI files on your system.
  • Verify the location and permissions of the following setting in your PHP.ini:
upload_tmp_dir="/temp"

session.save_path="/temp"
  • Verify if your server runs a suitable PHP version.

Сообщения об ошибках о несуществующих ресурсах

Sometimes, files are not uploaded correctly or were broken during the upload process. This leads to several different error messages. Most of them refer to a file or function within a file which can't be found.

Решение: Загрузите файлы заново используя FTP-клиент в бинарном режиме.

Requirements page

What is the mbstring (Multibyte String Functions) library?

The mbstring library is a PHP library that can convert char sets from one language to another. You need it if you want to run LimeSurvey. To check if it is already installed, open the URL from an web browser:

http://<your_server>/<your_limesurvey_directory>/admin/install/phpinfo.php

A lot of information will be shown. Search for the string 'mbstring' under the Configuration section. If you find the mbstring section then all should be well and you can continue on with your LimeSurvey installation!

If you don't find the mbstring section, you might have a problem on your hands. There are three possible scenarios:

  • If it's your host provider's server, ask for the activation of that extension in PHP or further information on how you can activate it - if you have a good administration panel for your server, you may be able to activate it yourself;
  • If it's your own Linux server, you may have to re-compile PHP and include the mbstring library. Ask the Linux experts how to do that. However, you can install it using your Linux package manager, which is mostly available in all Linux distributions nowadays;
    • If you are using a version of Linux that supports 'yum' (CentOS, RedHat, Fedora):
      • Use the terminal (as a super user) and type: yum install php-mbstring;
      • Make sure to update /etc/php.ini and uncomment the various mbstring params;
      • Make sure to restart apache after installing it: /etc/init.d/httpd restart;
  • If it's your own Windows server, search for php.ini on your system, open it with an editor and search for mbstring. Most probably, the line that contains that string is commented out with a semicolon. Remove the semicolon, save, and restart your web server.

Stuck at checking file system permissions

If SELinux is activated (primarily on CentOS), then you might get an error that the file system permissions are not correct, even if the list of directories is empty. SELinux prevents writing even though the permissions are on for example on 777 or 755. To configure SELinux correctly for your server - check out the SELinux documentation.

После создания базы данных

Пустая страница после создания базы данных

Symptoms

  • LimeSurvey installed OK, and database was created, but instead of the admin page, you get an empty page
  • Web server log shows "Fatal error: Call to a member function on a non-object in /path/to/limesurvey/admin/login_check.php on line 69"

Исправление

This is probably related to an incorrect setting for $rooturl or $rootdir in config.php. The file config.php attempts to set $rootdir correctly by calling dirname('''FILE'''). While this usually works, it can be upset when LimeSurvey is installed in a user's home or public_html directory and the home directory is mounted over NFS. To set up manually the $rootdir, (your shell or pwd command may show you a path like "/disks/hostname/home/username/public_html/limesurvey"), try using "/home/username/public_html/limesurvey".

When accessing the admin page, the browser keeps running and will eventually fail to show it

Symptoms

  • LimeSurvey installed OK and the database was created. But when you access the admin page, the browser keeps running and will eventually fail to show the page.
  • When you check the web server access log, its size has become quite big (in some cases, more than 2 GB).
  • Inside the access log, you get this message filling the log:
  Warning : fread() [function.fread]: Length parameter must be greater than 0 in /limesurvey/classes/php-gettext/streams.php on line 120.

The line number may be different depending on your LimeSurvey version.

Исправление

Это может случаться при активированном параметре mbstring.func_overload. Проверьте Ваш php.ini и исправьте

mbstring.func_overload = 0

This means no function overloading. See the PHP manual for this setting: Function Overloading Feature.

При попытке доступа к странице администратора браузер показывает ошибку Fatal error: Call to a member function gT() on a non-object in login_check.php on line 76

Symptoms

  • LimeSurvey installed OK and database was created. But when redirected to the admin page, the browser displayed the the listed error.
  • $rootdir and $rooturl are correctly set in config.php.
  • The disk path name for limesurvey installation directory includes one of the following characters: (,) or +.
Other characters may also induce the same behaviour.

Исправление

Move/rename the limesurvey installation directory so that the path name includes non of the following characters: (, ) or + characters.

После установки

For all issues happening after a successful installation, please refer to the Troubleshooting page.