Actions

Optional settings/ru: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
(Updating to match new version of source page)
 
(26 intermediate revisions by 2 users not shown)
Line 4: Line 4:
The following section is addressed to those of you who would like to edit those configuration settings that could not be modified with the help of the GUI (Graphical User Interface) of the LimeSurvey installation. Please bear in mind that all the changes from the LimeSurvey root directory are done at your own risk. Nevertheless, in the case in which you are experiencing problems/need further guidance, join the [https://www.limesurvey.org/forum discussion forums] or the [irc://irc.freenode.net/limesurvey|IRC IRC channel] for help from the LimeSurvey community.
The following section is addressed to those of you who would like to edit those configuration settings that could not be modified with the help of the GUI (Graphical User Interface) of the LimeSurvey installation. Please bear in mind that all the changes from the LimeSurvey root directory are done at your own risk. Nevertheless, in the case in which you are experiencing problems/need further guidance, join the [https://www.limesurvey.org/forum discussion forums] or the [irc://irc.freenode.net/limesurvey|IRC IRC channel] for help from the LimeSurvey community.


=Introduction=
<div class="mw-translate-fuzzy">
=Примечание=
</div>


To modify the configuration settings of the installation, you have to edit the optional settings. They can be found in the /application/config/'''config-defaults.php''', which is located in the LimeSurvey root directory. The default settings of the standard installation can be found in config-defaults.php. Some of them can be overridden by using the [[Global settings|global settings]] dialog, while the others will have to be manually edited.   
<div class="mw-translate-fuzzy">
Данные вариативные настройки могут быть найдены в файле application/config/config-defaults.php стандартной установки - некоторые из них используются только для первой установки и переопределены в [[Глобальных параметрах]].
{{Внимание|Если Вы хотите изменить данные настройки, пожалуйста, не меняйте их в файле config-defaults.php, а скопируйте интересующую Вас линию в файл /application/config/config.php в формате <nowiki>'config'=>array()</nowiki> и изменяйте ее там.}}
Все параметры в config.php переопределяют стандартные значения переменных указанные в config-defaults.php и некоторые их них переопределяются в Глобальных параметрах dialog{{Newln|1.87}}. Таким образом намного проще обновить Вашу установку в будущем!
</div>  


{{Alert|If you want to change these settings, please do not change them in config-defaults.php, but copy the particular setting/line to /application/config/'''config.php''' in <nowiki>'config'=>array( )</nowiki> and change it there. All the newly modified/introduced settings from the config.php file will override the default values from config-defaults.php.}}
{{Alert|If you want to change these settings, please do not change them in config-defaults.php, but copy the particular setting/line to /application/config/'''config.php''' in <nowiki>'config'=>array( )</nowiki> and change it there. All the newly modified/introduced settings from the config.php file will override the default values from config-defaults.php.}}
Line 22: Line 28:


=Yii settings=
=Yii settings=
LimeSurvey uses the Yii framework, which has its own configuration parameters in the application/config/'''config.php''' file. You can also access some specific configuration settings of LimeSurvey via the Yii configuration.
 
LimeSurvey uses the Yii framework, which has its own configuration parameters in application/config/'''internal.php''' and application/config/'''config.php''' file. You can also access some specific configuration settings of LimeSurvey via the Yii configuration.
 
Since config.php array is merged to the whole config, you can replace any Yii params in the config.php file.


The Yii specific settings are set in the components array:
The Yii specific settings are set in the components array:
Line 43: Line 52:


==Session settings==
==Session settings==
You can set some session parameters in config.php (check the two examples from below). You can un-comment/add the part needed in config.php. See the [http://www.yiiframework.com/doc/api/1.1/CHttpSession Yii Documentation] for other settings.
 
You can set some session parameters in config.php (check the two examples from below). You can uncomment/add the part needed in config.php. See the [http://www.yiiframework.com/doc/api/1.1/CHttpSession Yii Documentation] for other settings.
 
{{Alert|If you need to update session settings to have multiple LimeSurvey instances running on the same server, check if you don't have to update [[Optional_settings#Request_settings|request settings]] for crsf cookie.}}
 
===Use table-based sessions===
 
LimeSurvey can use table-based sessions, you find a commented part on the default config.php generated file. To use table-based session, remove the // before each line.
 
<syntaxhighlight lang="php" enclose="pre">
        'session' => array (
            'class' => 'application.core.web.DbHttpSession',
            'connectionID' => 'db',
            'sessionTableName' => '{{sessions}}',
        ),
</syntaxhighlight>
 
{{Alert|Table-based sessions are currently not supported on MSSQL server.}}
 
===Other sessions update===


If you use SSL ('https') for your LimeSurvey installation, adding the following lines to your config.php will increase the security of the session:
If you use SSL ('https') for your LimeSurvey installation, adding the following lines to your config.php will increase the security of the session:
Line 61: Line 89:
                     'domain' => '.example.org',
                     'domain' => '.example.org',
                 ),
                 ),
            ),
</syntaxhighlight>
If you have mutiples installation on the same server, it can be more quick and easy to set different session name for each LimeSurvey instance. This can be need for IE11 in some condition (see [https://bugs.limesurvey.org/view.php?id=12083#c42892 issue 12083])
<syntaxhighlight lang="php" enclose="pre">        // Set the name of the session
        'session' => array (
            'sessionName' => "LimeSurveyN1",
             ),
             ),
</syntaxhighlight>
</syntaxhighlight>
Line 78: Line 113:
             ),
             ),
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang="php" enclose="pre">        // Set the cookie domain name for CSRF protection
<syntaxhighlight lang="php" enclose="pre">        // Set the cookie domain name and path for CSRF protection, path is used if you have different instance on same domain
         'request' => array(
         'request' => array(
             'csrfCookie' => array( 'domain' => '.example.com' )
             'csrfCookie' => array(  
                'domain' => '.example.com',
                'path' => '/limesurvey/',
            )
         ),
         ),
</syntaxhighlight>
</syntaxhighlight>


If you need to update only the url for token emails, set your [[Optional_settings#Advanced_path_settings|publicurl]] in your config.php file.
If you need to update only the url for token emails, set your [[Optional_settings#Advanced_path_settings|publicurl]] in your config.php file.
==Allow usage of session and Csrf Validation in iFrame {{NewIn|v=3.24.3}}==
After allow [[Global_settings#Security|Iframe embedding]] you need to update some configuration part.
{{Alert|Attention, even with all settings : allow form in iframe can broke on some browser or with user specific settings. This settings was tested with Firefox 81.0.2 to 115 and Chromium 85.0.4183.121 to 119, and119 Edge with default settings. '''No support on this feature, only community support'''.}}
===Allow session start in iframe===
The session needs to be secure (valid https) , httponly and samesite to None. All settings must be set to all lowercase.
<syntaxhighlight lang="php" enclose="pre"> 'session' => array (
'sessionName'=>'LS-VBXZZORFJZCAKGYI',
// Uncomment the following lines if you need table-based sessions.
// Note: Table-based sessions are currently not supported on MSSQL server.
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
'cookieParams' => array(
'secure' => true,
'httponly' => true,
'samesite' => 'None',
),
),
</syntaxhighlight>
===Allow csrf cookie in iframe===
Same as session: must be secure and sameSite set to None. The whole array must be added at the same level as session.
<syntaxhighlight lang="php" enclose="pre"> 'request' => array(
'enableCsrfValidation'=>true,
'csrfCookie' => array(
'sameSite' => 'None',
'secure' => true,
),
),
</syntaxhighlight>


==URL settings==
==URL settings==
{{Alert|If you need to update only the url for token and other emails, set your [[Optional_settings#Advanced_url_settings|publicurl]] in your config.php file.}}
To change the default URL settings, update the urlManager:
To change the default URL settings, update the urlManager:
<syntaxhighlight lang="php" enclose="pre">      // Use short URL
<syntaxhighlight lang="php" enclose="pre">      // Use short URL
Line 94: Line 174:
),
),
</syntaxhighlight>
</syntaxhighlight>
You can also add .html after the survey id in the following way:
You can also add .html after the survey id in the following way:
<syntaxhighlight lang="php" enclose="pre">      // Use short URL
<syntaxhighlight lang="php" enclose="pre">      // Use short URL
Line 111: Line 193:


For example, a quick solution to log errors and warnings in files is:  
For example, a quick solution to log errors and warnings in files is:  
<syntaxhighlight lang="php" enclose="pre">       // Log error
<syntaxhighlight lang="php" enclose="pre">
'log' => array(
return array(
    'routes' => array(
'components' => array(
        'fileError' => array(
/* Other component part here 'db' for example */
            'class' => 'CFileLogRoute',
'log' => array(
            'levels' => 'warning, error',
'routes' => array(
        ),
'fileError' => array(
    ),
'class' => 'CFileLogRoute',
),
'levels' => 'warning, error',
'except' => 'exception.CHttpException.404',
),
),
),
/* Other component part here 'urlManager' for example */
),
/* Final part (with 'runtimePath' 'config' for example) */
);
</syntaxhighlight>
</syntaxhighlight>


Line 143: Line 233:
=Общие настройки=
=Общие настройки=


*'''sitename''': Gives your survey site a name. This name will appear in the survey list overview and in the administration header. The default value is 'LimeSurvey' and it can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.
<div class="mw-translate-fuzzy">
*'''siteadminemail:''' This is the default email address of the site administrator and it is used for system messages and contact options. This setting is used only as default value and can be overridden in the [[Global settings|global settings]] dialog.
*'''sitename''': Определяет имя Вашего сайта опросов. Это имя отображается в обзоре списка опросов и шапке административной панели. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
*'''siteadminbounce:''' This is the email address where bounced emails will be sent to. This setting is used only as default value and can be  overridden by the [[Global settings|global settings]] dialog.
*'''siteadminemail''': Это стандартный адрес почты Администратора и используется для системных сообщений и опций контакта. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
*'''siteadminname:''' The real name of the site administrator. This setting is used only as default value and can be overridden in the [[Global settings|global settings]] dialog).
*'''suteadminbounce''': Это адрес для пришедших возвратов. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
*'''proxy_host_name:''' This is the host name of your proxy server (it has to be mentioned if you are behind a proxy and you want to update LimeSurvey using [[ComfortUpdate|ComfortUpdate]]).
*'''siteadminname''': Это реальное имя Администратора сайта. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
*'''proxy_host_port:''' This is the port of your proxy server (it has to be mentioned if you are behind a proxy and you want to update LimeSurvey  using [[ComfortUpdate|ComfortUpdate]]).
</div>


=Безопасность=
=Безопасность=


* '''maxLoginAttempt''': This is the number of attempts a user has to enter the correct password before he or she gets her or his IP address blocked/locked out. The default value is 3 and it can be modified from config.php.
<div class="mw-translate-fuzzy">
* '''timeOutTime''': If the user enters the password incorrectly for <maxLoginAttempt>, she or he gets locked out for <timeOutTime> seconds. The default value is 10 minutes and it can be modified from config.php.
* '''surveyPreview_require_Auth''': истинно по-умолчанию. Если вы установите в значение "ложь", то любой человек может тестировать Ваш опрос воспользовавшись URL - без авторизации и без предварительной активации опроса. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
* '''surveyPreview_require_Auth''': Set to true by default. If you set this to 'false', any person can test your survey using the survey URL, without logging in to the administration panel and without having to activate the survey first. This setting is a default value and can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.
* '''usercontrolSameGroupPolicy''': истинно по-умолчанию. По-умолчанию, не привилегированные пользователи в LimeSurvey могут видеть только пользователей, которых они создали или пользователей принадлежащих той же группе в которую входят они сами. Вы можете отключить данную возможность.
* '''usercontrolSameGroupPolicy''': Set to true by default. By default, non-admin users defined in the LimeSurvey management interface will only be able to see users they create or users that belong to at least one same group. The default value can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.
*'''filterxsshtml:''' Данный параметр включает фильтрацию подозрительных HTML-тегов в опросах, группах вопросов, вопросах и текстовых ответах в административном интерфейсе. Данный параметр стоит выключить лишь в том случае, если Вы полностью доверяете людям осуществляющим администрирование LimeSurvey и если Вы хотите позволить этим людям использовать Javascript, Flash-ролики, и т. д. <span class="warning">Супер-администратор никогда не фильтруется на подозрительные HTML-теги.</span>. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
*'''filterxsshtml:''' This setting enables the filtering of suspicious html tags located within surveys, groups, and questions and answer texts in the administration interface. Leave this to 'false' only if you absolutely trust the users you created for the administration of LimeSurvey and if you want to allow these users to be able to use Javascript, Flash Movies, etc.. <span class="warning">The super admins never have their HTML filtered</span>. The default value can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.
*'''demoModeOnly:''' Если данный параметр включен, то LimeSurvey перейдет в demo-режим. Демо-режим влияет на следующие вещи:
*'''demoMode:''' If this option is set to 'true' in config.php, then LimeSurvey will go into demo mode. The demo mode changes the following things:
** Отключает возможность изменения пароля администратора и прочих параметров его учетной записи
** Disables admin user's details and password changing;
** Отключает выгрузку файлов в редактор шаблонов
** Disables the upload of files on the template editor;
** Отключает рассылку почтовых приглашений и напоминаний
** Disables sending email invitations and reminders;
** Отключает возможность дампа базы данных
** Disables the creation of a database dump;
** Отключает возможность сохранения следующих глобальных параметров: имя сайта, язык по-умолчанию, режим HTML-редактора по-умолчанию, XSS фильтр
** Disables the ability to modify the following global settings: site name, default language, default HTML editor mode, XSS filter.
</div>


= Resources=
<div class="mw-translate-fuzzy">
*'''sessionlifetime:''' Defines the time in seconds after which a survey session expires. It applies only if you are using database sessions. If you do use database sessions, change the parameter in config.php or override the default value from the [[Global settings|global settings]] dialog.
=Ресурсы=
*'''memorylimit:''' This determines how much memory LimeSurvey can access. '128 MB' is the minimum (MB=Megabyte) recommended. If you receive time out errors or have problems generating statistics or exporting files, raise this limit to '256 MB' or higher. If your web server has set a higher limit in config.php, then this setting will be ignored.  
*'''sessionlifetime''': Определяет время в секундах после истечения которого сессия считается просроченной. По-умолчанию: $sessionlifetime    =  3600;. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
*'''memorylimit:''' Устанавливает количество памяти к которой имеет доступ LimeSurvey. '32' (M=MiB) минимальное рекомендуемое значение. Если Вы получаете ошибки по истечению времени ожидания или проблемы с генерацией статистики или экспортом файлов, то попробуйте увеличить данный лимит до '128' или '256'.
</div>


<div class="warningbox">Пожалуйста, обратите Ваше внимание на то, что такие локальные параметры приложения могут всегда быть переопределены глобальными настройками сервера.</div>
<div class="warningbox">Пожалуйста, обратите Ваше внимание на то, что такие локальные параметры приложения могут всегда быть переопределены глобальными настройками сервера.</div>
Line 175: Line 267:
*php_value memory_limit 128M в .htaccess файл корневой директории LimeSurvey
*php_value memory_limit 128M в .htaccess файл корневой директории LimeSurvey


=Appearance=
*'''max_execution_time:''' Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. To be allowed to export big survey data and statistics, LimeSurvey try to set it by default to 1200 seconds. You can set a bigger time or a lower time if needed. Only accessible via php config file.
*'''dropdownthreshold'''{{ObsoleteIn|2.50}}: When "R" is selected for <code>$dropdowns</code>, the administrator is allowed to set a maximum number of options that will be displayed as radio buttons, before converting back to a dropdown list. If there is a question that has a large number of options, displaying all of them at once as radio buttons can look unwieldy, and can become counter-intuitive to users. Setting this to a maximum of, say 25 (which is the default) means that large lists are easier to be used by the administrators for the survey participant.
*'''repeatheadings:''' With the Array question type, you'll often have a lot of subquestions, which - when displayed on screen - take up more than one page. This setting lets you decide how many subquestions should be displayed before repeating the header information for the question. A good setting for this is around 15. If you don't want the headings to repeat at all, set this to 0. This setting is overridden in the [[Global settings|global settings]] dialog {{NewIn|2.05}}.
*'''minrepeatheadings:''' The minimum number of remaining subquestions that are required before repeating the headings in Array questions. The default value is 3 and it can be edited in config.php.
*'''defaulttemplate:''' This setting specifies the default theme used for the 'public list' of surveys. This setting can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.
*'''defaulthtmleditormode:''' Sets the default mode for the integrated HTML editor. This setting can be overridden in the [[Global settings|global settings]] dialog or edited in config.php. The valid settings are:
** 'inline' - Inline replacement of fields by an HTML editor. Slow but convenient and user friendly;
** 'popup' - Adds an icon that runs the HTML editor in a popup if needed. Faster, but HTML code is displayed in the form;
** 'none'-  No HTML editor;
*'''column_style:''' Defines how columns are rendered for survey answers when using [[QS:Display_columns|display_columns]]. It can be edited in the config.php file. The valid settings are:
** 'css' - it uses one of the various CSS methods to create columns (see the template style sheet for details);
** 'ul' - the columns are rendered as multiple floated unordered lists (default);
** 'table' - it uses conventional-tables-based layout;
** NULL - it disables the use of columns.


=Language & time=
<div class="mw-translate-fuzzy">
*'''defaultlang:''' This should be set to the default language to be used in your administration scripts, and also the default setting for language in the public survey list. This setting can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.
=Отображение=
*'''timeadjust:''' If your web server is in a different time zone to the location where your surveys will be based, put the difference between your server and your home time zone here. For example, I live in Australia, but I use a US web server. The web server is 14 hours behind my local time zone. So my setting here is "14". In other words, it adds 14 hours to the web servers time. This setting is particularly important when surveys timestamp the responses. This setting can be overridden in the [[Global settings|global settings]] dialog or edited in config.php.
*'''$lwcdropdowns''': {{ObsoleteIn|2.0}} Возможные значения: "L" или "R". Установка на "R" даст в результате отображение вопросов типа 'Список с комментариями' как радио кнопки, в то время как "L" даст в результате отображение вопросов типа 'Список с комментариями' как  'выпадающий список'.
*'''$dropdownthreshold''': Если Вы выбрали "R" для $dropdowns, это позволит Вам установить максимальный порог количества вариантов которые будут отображаться как радио-кнопки, перед превращением в выпадающий список. Если у Вас имеется вопрос с большим числом вариантов, то их отображение как радио-кнопок может выглядеть громоздко и нелогично для пользователей. Установка на максимум (25 - по-умолчанию) означает, что чем больше список тем быстрее его заполнять для участников опроса.
*'''$repeatheadings''': У вопросов типа "Массив" зачастую имеется большое количество вариантов ответов, которые при отображении занимают более чем одну страницу. Данный параметр позволяет Вам решать как много вариантов ответов будет показано прежде чем повторятся заголовки массива с информацией о вопросе. Хорошим выбором будет установка данного параметра в значение равное 15. Если же Вы не хотите повторять заголовки, установите значение параметра равное нулю (которое является значением по-умолчанию).
*'''$minrepeatheadings''': Минимальное количество ответов, которое требуется перед повторением заголовков в вопросе типа "Массив".
*'''$addTitleToLinks''': Если данный параметр включен, то LimeSurvey будет добавлять html элемент 'title' ко всем ссылкам используемым в меню. Это поможет экранным считывателям анализировать меню. Включайте данный параметр только если Вы используете экранный считыватель потому что он пересекается с подсказками.
*'''$defaulttemplate''': Эта настройка определяет тему по-умолчанию, используемую в 'публичном списке' опросов. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
*'''$defaulthtmleditormode''': Устанавливает режим по-умолчанию для интегрированного HTML-редактора. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}. Действительные параметры: inline (по-умолчанию), popup and none:
** ''inline'': Встроенная замена полей HTML-редактором. Обладает дружеским интерфейсом, но медленный в исполнении.
** ''popup'': Добавляет значок который вызывает всплывающее меню HTML-редактора. Быстрее, но в форме отображается html-код.
** ''none'': без HTML-редактора.
</div>


=Survey behavior=
<div class="mw-translate-fuzzy">
*'''deletenonvalues:''' Use this feature with caution. By default (a value of 1), irrelevant questions are NULLed in the database. This ensures that the data in your database is internally consistent. However, there are rare cases where you might want to hold onto irrelevant values, in which case you can set the value to 0. For example, you ask a male person his gender, and he accidentally says 'female' and then answers some female-specific questions (questions that are conditioned on being female, so are only relevant for women). Then, he realizes his mistake, backs up, sets the gender to 'male', and continues with the survey.  Now, the female-specific questions are irrelevant. If <code>$deletenonvalues==1</code>, those irrelevant values will be cleared (NULLed) in the database. If <code>$deletenonvalues==0</code>, his erroneous answers will not be deleted, so they will still be present in the database when you analyze it.  
=Язык и Время=
*'''shownoanswer:''' When a radio button/select type question that contains editable answers (i.e.: List, Array questions) is not mandatory and 'shownoanswer' is set to 1, an additional 'No answer' entry is shown - so that participants may choose to not answer the question. Some people prefer this not to be available. This setting can be overridden from the [[Global settings|global settings]] dialog or edited in config.php. Valid values are:
*'''$defaultlang''': Устанавливает основной язык используемый в административных скриптах, а также настраивает основной язык в публичных опросах. Вы можете изменить данный параметр для публичных опросов на опрос-опрос базе с помощью административных скриптов. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
**'0': No;
*'''$timeadjust''': Если Ваш web-сервер в отличной временной зоне от местоположения где проводятся Ваши опросы, поместите разницу между Вашим сервером и Вашей домашней временной зоной здесь. Например, Я живу в Австралии, но сервер находится в США. У Web-сервера разница с моей временной зоной в 14 часов. Таким образом, параметр необходимо установить равным "14". Другими словами, данный параметр добавляет 14 часов ко времени web-сервера. Этот параметр особенно важен для временных штампов вопросов и ответов. Этот параметр переопределяется в [[Global settings|Общие настройки]] {{Newln|1.87}}.
**'1': Yes;
* '''$modrewrite''': {{ObsoleteIn|2.0}} Если установлено в 1, то активирует возможность переписывания URL особым способом (Например: http://survey.example.com/123456/lang-fr/tk-sdlfkjozeiru в отличие от http://survey.example.com/index.php?sid=123456&lang;=fr&token;=sdlfkjozeiru). Прежде чем Вы активируете этот параметр, Вы <b><u>должны</u></b> переименовать файл из "''htaccess.txt''" в "''.htaccess''". Вам необходим Web-сервер Apache с корректно установленным модулем mod_rewrite.
**'2': The Survey admin can choose.
</div>
*'''printanswershonorsconditions:''' This setting determines if the printanswers feature will display entries from questions that were hidden by conditions-branching (Default: 1 = hide answers from questions hidden by conditions).
*'''hide_groupdescr_allinone:''' This setting is relevant for all-in-one surveys using conditions . When this is set to 'true', the group name and description is hidden if all questions in the group are hidden. The default value is 'true'  - hides group name and description when all questions in the group are hidden by conditions. It can be edited in config.php.
*'''showpopups:'''  Show popup messages if mandatory or conditional questions have not been answered correctly:
** '1'=Show popup message (default);
** '0'=Show message on page instead;
** '-1'=Do not show the message at all (in this case, users will still see the question-specific tips indicating which questions must be answered).


=Development and debugging=
<div class="mw-translate-fuzzy">
*'''debug:''' With this setting, you set the PHP error reporting to E_ALL. This means that every little notice, warning or error related to the script is shown. This setting should be only switched to '1' if you are trying to debug the application for any reason. If you are a developer, switch it to '2'. Don't switch it to '1' or '2' in production since it might cause path disclosure. The default value is '0' and it can be edited in config.php.  
=Поведение опросов=
*'''debugsql:''' Activate this setting if you want to display all SQL queries executed for the script on the bottom of each page. Very useful for the optimization of the the number of queries. In order to activate it, change the default value to '1' from the config.php file.
*'''$allowmandbackwards''': Если данной переменной присвоить значение 1, то это позволит участникам опроса возвратиться к предыдущим вопросам даже если они не отвечали на текущие обязательные вопросы. Если же присвоено значение 0, то участники должны ответить на текущие обязательные вопросы, чтобы перейти к предыдущим.
*'''$deletenonvalues''': Пользуйтесь данной возможностью с присущей осторожностью. По-умолчанию (значение 1) все нелогичные ответы в базе данных затираются на NULL. Это позволяет быть уверенным в том, что данные в Вашей базе хранятся должным образом. Хотя, в некоторых случаях, возможно, Вам понадобится сохранить некорректные ответы в базе данных. Для этого Вам необходимо присвоить значение переменной 0. Давайте представим, что в своем опросе Вы спросили у участника его пол и тот указал ошибочно 'женский' и в дальнейшем пошел по ветке вопросов присущих женщинам. Когда участник понял свою ошибку он возвращается, меняет пол на 'мужской' и продолжает опрос. Теперь ответы на 'женские' вопросы становятся некорректными для данного участника. Если переменная равна 1, то такие данные немедленно очищаются (NULL) в базе данных. Если же значение переменной равно 0, то его ответы остаются в базе и Вы можете их видеть при ее анализе.
*'''$shownoanswer''': Когда вопрос типа радио-кнопка/список содержащий редактируемые поля (т.е. список, массив вопросов) не обязателен к ответу и $shownoanswer установлено в 1, то показывается дополнительный вариант ответа "N/A" - который означает "Нет ответа", чтобы участники могли не отвечать на данный вопрос. Некоторые предпочитают, чтобы данная возможность не была доступна. Установка переменной в 0, отключает данную возможность. Параметр переопределяется в диалоговом окне [[Global settings|Общие настройки]] {{Newln|1.87}}.
*'''$printanswershonorsconditions''': Данная настройка определяет будут ли отображаться вопросы, которые были скрыты согласно условия. (По-умолчанию: 1 = скрывать ответы на вопросы скрытые по условию).
*'''$hide_groupdescr_allinone''': {{NewIn|1.85RC3}} Данная настройка предназначена для опросов "все в одном" содержащих условия. Когда она включена имя группа и ее описание, а также все условия в группе скрыты. (По-умолчанию: истина (скрыть имя группы, описание, когда все условия в группе скрыты по условию)).
*'''$showpopups''': Показывать всплывающие окна сообщений если обязательный или вопрос с условием не был отвечен корректно. 1=показывать всплывающие окна сообщений (по-умолчанию), 0=показывать сообщения внутри текущего окна, -1=не показывать сообщения совсем (в таком случае пользователи будут видеть специфичные для вопроса подсказки, сообщающие о том, на какой вопрос необходимо ответить).
</div>
 
== Numerical question type behavior  ==
 
*'''bFixNumAuto:''' Numeric fields can be automatically filtered to remove all non numeric values. By default this is enable, you can disable it globally. This settings is related to ''Fix automatically numeric value'' in core theme options. It was enable for ''Yes'', disable for ''Only for expression'' and ''No''.
*'''bNumRealValue:''' Numeric fields used in expression manager can be fixed or not. It's fixed by default. If NUMERIC is a numerical question : disable or 0 : {NUMERIC} with bad caracters send <nowiki>''</nowiki>, enable or 1 : {NUMERIC} send all character entered. This settings is related to ''Fix automatically numeric value'' in core theme options. It was enable for ''Yes'' and ''Only for expression'' and  disable for ''No''.
 
<div class="mw-translate-fuzzy">
=Разработка=
*'''$debug''': Включив эту настройку Вы активируете отчеты об ошибках PHP в режим E_ALL (показывать все). Это значит, что малейшие примечания возникающие в скриптах будут отображены. Настройка должна быть выставлена в значение 1 если вы пытаетесь отладить приложение по какой либо причине, если же Вы являетесь разработчиком, то переключите в 2. Не включайте режим отладки (1 или 2) на боевой машине, т.к. это предоставит дополнительную информацию третьим лицам.(По-умолчанию: 0)
</div>


In the case in which you experience an error in the application, we strongly recommend to activate the debug setting in order to get a more detailed error that you can submit with the bug report:
In the case in which you experience an error in the application, we strongly recommend to activate the debug setting in order to get a more detailed error that you can submit with the bug report:
Line 219: Line 318:
     )
     )
</syntaxhighlight>
</syntaxhighlight>
If you work on plugin and need a quick way to dump variables on screen : you can use traceVar function. If debug is set : this function use CWebLogRoute to be shown on HTML page. Usage <code>traceVar($MyVariable)</code>


=Настройки электронной почты=
=Настройки электронной почты=


All the settings from below can be overridden in the [[Global settings|global settings]] dialog.
<div class="mw-translate-fuzzy">
*'''emailmethod:'' This determines how email messages are being sent. The following options are available:
Примечание:
**'mail:' it uses internal PHP mailer;
Данные настройки определяются в диалоговом окне [[Global settings|общих настроек]] {{NewIn|1.87}}.
**'sendmail:' it uses sendmail mailer;
*'''$emailmethod''':  Данный параметр определяет как будет отправлено письмо. Доступны следующие варианты отправки:
**'smtp:' it uses SMTP relaying. Use this setting when you are running LimeSurvey on a host that is not your mail server.
**'''mail''': с помощью PHP
*'''emailsmtphost:'' If you use 'smtp' as <code>$emailmethod</code>, then you have to put your SMTP-server here. If you are using Google mail you might have to add the port number like $emailsmtphost = 'smtp.gmail.com:465'.
**'''sendmail''': с помощью почтового сервера sendmail
*''emailsmtpuser:'' If your SMTP-server needs authentication then set this to your user name, otherwise it must be blank.
**'''smtp''': с помощью релея SMTP. Данный способ предпочтителен тогда, когда LimeSurvey установлен на узел не являющийся Вашим почтовым сервером.
*''emailsmtppassword:'' If your SMTP-server needs authentication then set this to your password, otherwise it must be blank.
*'''$emailsmtphost''': Если Вы пользуетесь 'smtp' как $emailmethod, то Вы можете записать сюда адрес Вашего сервера. Если же Вы пользуетесь почтой от Google, то Вам необходимо дополнительно указать порт наподобие как здесь: $emailsmtphost = 'smtp.gmail.com:465';
*''emailsmtpssl:'' Set this to 'ssl' or 'tls' to use SSL/TLS for SMTP connection.
*'''$emailsmtpuser''': Если Ваш SMTP-сервер запрашивает аутентификацию, то укажите здесь имя пользователя, в противном случае оставьте пустым.
*''maxemails:'' When sending invitations or reminders to survey participants, this setting is used to determine how many emails can be sent in one bunch. Different web servers have different email capacities and if your script takes too long to send a bunch of emails, the script could time out and cause errors. Most web servers can send 100 emails at a time within the default 30 second time limit for a PHP script. If you get script timeout errors when sending large numbers of emails, reduce the number in this setting. Clicking the 'send email invitation' button from the token control toolbar (not the button situated on the right of each token) sends the <maxemails> number of invitations, then it displays a list of the addresses of the recipients and a warning that ''there are more emails pending than could be sent in one batch. Continue sending emails by clicking below. There are ### emails still to be sent.'' and provides a "continue button" to proceed with the next batch. I.e., the user determines when to send the next batch after each batch gets emailed. It is not necessary to wait with this screen active. The admin could log out and come back at a later time to send the next batch of invites.
*'''$emailsmtppassword''':  Если Ваш SMTP-сервер запрашивает аутентификацию, то укажите здесь пароль, в противном случае оставьте пустым.
*'''$emailsmtpssl''': Установите здесь 'ssl' или 'tls' чтобы устанавливать SSL/TLS SMTP-соединение.
*'''$maxemails''': При рассылке приглашений или напоминаний данный параметр определяет какое количество писем может быть отправлено за раз. Различные web-серверы имеют различные почтовые емкости и если Ваш скрипт очень долго отправляет письма, то существует риск, что он завершится с ошибками (превышено время выполнения скрипта). Большинство web-серверов могут отправлять по 100 писем за раз в течение 30 секунд (ограничение для PHP-скрипта). Если у Вас возникли проблемы с отправкой писем и сыпятся ошибка с превышением времени ожидания выполнения скрипта, то советуем Вам уменьшить значение данного параметра. Кликнув по кнопке 'Отправить приглашение по e-mail' на панели управления ключами доступа (не по кнопке справа от каждого ключа доступа!), будет отправлено максимальное количество писем-приглашений, затем будет отображен список адресатов и предупреждение "Ожидается отправка писем большего количества, чем может быть отправлено за раз. Продолжить отправку сообщений можно нажав кнопку ниже. Имеется ### писем к отправке." и предложение нажать кнопку "Продолжить", чтобы приступить к рассылке следующей партии писем. Т.е. пользователю предоставляется право решать, когда будет отправлена следующая партия писем. Не обязательно оставлять данный экран активным. Администратор может выйти из системы и вернуться назад позднее, чтобы разослать следующую партию приглашений.
</div>


= Statistics and response browsing=
<div class="mw-translate-fuzzy">
*'''filterout_incomplete_answers:''' Control the default behavior of filtering incomplete answers when browsing or analyzing responses. For a discussion on incomplete responses see our [[Browsing survey results|browsing survey results wiki]]. Since these records can corrupt the statistics, an option is given to switch this filter on or off in several GUI forms. The parameter can be edited in the config.php. The following options are available:
=Обзор статистики и ответов=
**'show': Allows you to visualize both complete and incomplete answers;
*'''usejpgraph''': {{ObsoleteIn|1.8}} [http://www.aditus.nu/jpgraph/ JPGraph-библиотека] позволяет Вам отображать результаты опросов в разделе Статистика системы LimeSurvey в виде столбцов и круговых диаграмм. Если Вы правильно настроили jpgraph на Вашем сервера, то Вы можете включить эту возможность (1=вкл., 0=выкл.). Удостоверьтесь, что на сервере стоит минимально необходимая версия PHP для конкретной версии JPGraph! В настоящее время данная возможность находится в стадии разработки, поэтому не удивляйтесь если получили странные результаты.
**'filter': It shows only complete answers;
*'''jpgraphdir''': {{ObsoleteIn|1.8}} Расположение скриптов jpgraph на диске. Данная опция требуется только тогда, когда $usejpgraph установлено в 1.
**'incomplete': Show only incomplete answers.
*'''jpgraphfont''': {{ObsoleteIn|1.8}} Параметр определяющий шрифт используемый в графиках. Полностью рабочий вариант: "FF_FONT1"
*'''strip_query_from_referer_url''': This setting determines if the referrer URL saves the parameter or not. The default value is 'false' (in this case, the referrer URL saves all parameters). Alternatively, this value can be set to 'true' and the parameter part of the referrer URL will be removed.
*'''embedded''': {{ObsoleteIn|2.0}} Если Вы хотите интегрировать LimeSurvey в другую страницу, то необходимо отключить отправку HTML-заголовков используя данную настройку и точки в заголовках методов пользовательских функций. Это грязный хак, но, тем не менее, должно помочь при быстрой интеграции.
*'''showaggregateddata:''' when activated, additional statistical values such as the arithmetic mean and standard deviation are shown. Furthermore, the data is aggregated to get a faster overview. For example, results of scale 1+2 and 4+5 are added to have a general ranking like "good" (1/2), "average" (3) and "bad" (4/5). This only affects question types  "A" (5 point array) and "5" (5 point choice).
*'''filterout_incomplete_answers''': Для управления поведением по-умолчанию при фильтрации незавершенных ответов во время обзора ответом см. [[Browsing survey results|Обзор результатов опроса]]. Поскольку данные записи могут нарушить статистику, варианты переключения данного параметра в графическом интерфейсе следующие (этот параметр в config.php установлен по-умолчанию для незавершенных ответов):
* '''PDF Export Settings:''' This feature activates PDF export for printable surveys and Print Answers. The PDF export function is totally experimental and the output is far from being perfect. Unfortunately, no support can be given at the moment - if you want to help to fix it, please get in touch with us.
**''show'': Показывать все ответы
**'usepdfexport': Set '0' to disable and '1' to enable;
**''filter'': Показывать только завершенные ответы
**'pdfdefaultfont': It represents the default font that will be used by the pdf export function. The default value is 'auto'. To change it, you have to set it to one of the [https://tcpdf.org/docs/fonts/ PDF core fonts].
**''incomplete'': Показывать только незавершенные ответы
**'alternatepdffontfile': It's an array with language keys and their corresponding font. The default font for each language can be replaced in the config.php file;
*'''strip_query_from_referer_url''': Данный параметр определяет будут ли сохраняться параметры из партнерских ссылок или нет. По-умолчанию "false" (в этом случае сохраняются все параметры). Альтернативой этому может быть установка значения "true" и часть ссылки с параметрами будет отсекаться.
**'pdffontsize': it shows the font size for normal texts; For the title of the survey, it is <pdffontsize>+4, while for the group title is <pdffontsize>+2. It can be edited in the config.php file or from the [Global settings|global settings]] dialog;
*'''showaggregateddata''': {{NewIn|1.8}} При активации данного параметра будут дополнительно показаны среднее арифметическое и среднее отклонение в статистике. Кроме того собираются для быстрого просмотра т.е. результаты диапазона 1+2 и 4+5 складываются, чтобы иметь общий ранг "хорший" (1/2), "средний" (3) и "плохой" (4/5). Это относится только к вопросам типа "A" (массив с пятибальной шкалой) и "5" (выбор из пяти вариантов).
**'notsupportlanguages': it includes a list with the languages for which no PDF font was found. The list includes Amharic ('am'), Sinhala ('si'), and Thai ('th'), and it can be found in the config-defaults.php file;
* '''PDF Export Settings''': {{NewIn|1.85}} Эта возможность активирует экспорт в PDF для печатных форм опросов и печати ответов. Экспорт в PDF - экспериментальный. Итоговый вывод не красивый. По этому вопросу отсутствует всяческая поддержка - свяжитесь с нами если Вы хотите помочь нам в этом.
**'pdforientation': Set 'L' for Landscape or 'P' for portrait format. It can be edited from the config.php file.
**usepdfexport: Установите 0 для выключения; 1 для включения
*'''Graph setting'''
**pdfdefaultfont: Шрифт используемый по-умолчанию
**'chartfontfile': Sets the font file name that is used to create the statistical charts. The file has to be located in the fonts directory, located in the LimeSurvey root folder. It can be edited in the config.php file;
**pdffontsize: Размер шрифта для нормального текста; Заголовок опроса +4; заголовок группы +2
**'alternatechartfontfile': It's an array with language keys and their corresponding font. It can be edited in the config.php file.
**notsupportlanguages = Массив не поддерживаемых языков: array('zh-Hant-TW','zh-Hant-HK','zh-Hans','ja','th');
*'''showsgqacode:''' This setting is used at the printable survey feature and defaults to 'false''. If you set showsgqacode = 'true';, the IDs of each question - and answer if applicable - will be shown. These IDs match the column heading at the Lime_survey_12345 table, which holds the answer data for a certain survey. These IDs can be used for a code book for manual database queries.
**pdforientation: Ориентация PDF. Установите L для ландшафтного или P для портретного формата
*'''$showsgqacode:''' {{NewIn|1.91}} Эта настройка используется для возможности печати опроса {IMG(attId="78",height="16",width="16")} и по-умолчанию ''false''. Если Вы установите ''showsgqacode = true;'' то будут отображены ID каждого вопроса и ответа; данные идентификаторы совпадают с заголовками столбцов в таблице Lime_survey_12345 которая содержит данные конкретного опроса. Эти идентификаторы могут быть использованы как код книги для ручных запросов к базе данных.
*{IMG(attId="79",height="200",width="400")}
</div>


= [[LDAP settings|Настройки LDAP]]=
= [[LDAP settings|Настройки LDAP]]=
Line 258: Line 365:
=Аутентификация=
=Аутентификация=


Starting with LimeSurvey 2.05, authentication will be handled by plugins. As a result, the information below might be outdated. See [[Plugins|the plugins wiki]] for most up to date information.
<div class="mw-translate-fuzzy">
В LimeSurvey 2.05 аутентификация осуществляется при помощи плагинов. В связи с этим данная информация может быть устаревшей. См. [[Plugins|Плагины]] для получения свежей информации.
</div>


==Передача проверки подлинности Web-серверу==
==Передача проверки подлинности Web-серверу==
Line 289: Line 398:
*False или пустой массив: в случае если пользователю запрещен доступ в LimeSurvey
*False или пустой массив: в случае если пользователю запрещен доступ в LimeSurvey
*массив содержащий все общие атрибуты пользовательского профиля как описано в '''$WebserverAuth_autouserprofile'''
*массив содержащий все общие атрибуты пользовательского профиля как описано в '''$WebserverAuth_autouserprofile'''
<syntaxhighlight lang="php" enclose="div">function hook_get_auth_webserver_profile($user_name)
<syntaxhighlight lang="php">function hook_get_auth_webserver_profile($user_name)
{
{
     // Retrieve user's data from your database backend (for instance LDAP) here
     // Retrieve user's data from your database backend (for instance LDAP) here
Line 320: Line 429:
В случае, если имя пользователя во внешней базе отличается от имени в локальной базе LimeSurvey, Вы можете найти полезной использование функции сопоставления имен пользователей. В LimeSurvey это осуществляется за счет использования параметра '''auth_webserver_user_map'''. Представим себе, что у Вас во внешней базе отсутствует пользователь с именем 'admin'. Чтобы в дальнейшем иметь возможность войти в LimeSurvey как admin, Вам необходимо сопоставить имя пользователя во внешней базе (пусть это будет 'myname') с логином 'admin' в LimeSurvey. Соответствующие этому настройки:
В случае, если имя пользователя во внешней базе отличается от имени в локальной базе LimeSurvey, Вы можете найти полезной использование функции сопоставления имен пользователей. В LimeSurvey это осуществляется за счет использования параметра '''auth_webserver_user_map'''. Представим себе, что у Вас во внешней базе отсутствует пользователь с именем 'admin'. Чтобы в дальнейшем иметь возможность войти в LimeSurvey как admin, Вам необходимо сопоставить имя пользователя во внешней базе (пусть это будет 'myname') с логином 'admin' в LimeSurvey. Соответствующие этому настройки:


<syntaxhighlight lang="php" enclose="div">'config'=>array(
<syntaxhighlight lang="php">'config'=>array(
...
...
'auth_webserver_user_map' => array ('myname' => 'admin');
'auth_webserver_user_map' => array ('myname' => 'admin');
Line 330: Line 439:
==Использование одноразовых паролей==
==Использование одноразовых паролей==


A user can open the LimeSurvey login page at default.com/limesurvey/admin and type the username and the one-time password which was previously written into the users table (column one_time_pw) by an external application.
<div class="mw-translate-fuzzy">
Пользователь может запросить у LimeSurvey логин и одноразовый пароль (ранее записанный в таблице `users` и столбце `one_time_pw`) в /limesurvey/admin при помощи внешнего приложения.
</div>


<div class="mw-translate-fuzzy">
Данный параметр должен быть включен ('''use_one_time_passwords''' => true) для разрешения использования одноразовых паролей (по-умолчанию = false). Больше информации может быть найдено
Данный параметр должен быть включен ('''use_one_time_passwords''' => true) для разрешения использования одноразовых паролей (по-умолчанию = false). Больше информации может быть найдено
</div>
More information can be found in the [[Manage users#Use one-time passwords|"Manage Users" section]].
= Encryption settings {{NewIn|4.0.0}} =
{{Alert|title=Attention|text=Once set, encryption keys should never be changed, otherwise all encrypted data could be lost !}}
{{Note|When update or install, this parameters was generated by LimeSurvey and set in <code>application/config/security.php</code> file. You can move this settings in config.php if you want or leave in security.php.}}
See [[data encryption]] for detail on this feature.
*'''encryptionkeypair'''
*'''encryptionpublickey'''
*'''encryptionsecretkey'''
= Advanced url settings=
*'''publicurl:''' This should be set to the URL location of your 'public scripts'. The public scripts are those located in the "limesurvey" folder (or whatever name you gave to the directory that all the other scripts and directories are kept in). '''This settings is available in config.php and it is used when LimeSurvey need an absolute url (for example when token emails are sent).'''
*'''homeurl:''' This should be set to the URL location of your administration scripts. These are located in the /limesurvey/admin folder. This should be set to the WEB URL location - for example, ''http://www.example.com/limesurvey/html/admin''. Don't add a trailing slash to this entry. The default setting in config.php attempts to detect the name of your server automatically using a php variable setting - <code>{$_SERVER<nowiki>[</nowiki>'SERVER_NAME']}</code>. '''In most cases, you can leave this and just modify the remainder of this string to match the directory name you have put the LimeSurvey scripts in.'''
*'''tempurl:''' This should be set to the URL location of your "/limesurvey/tmp" directory - or to a directory in which you would like LimeSurvey to use to serve temporary files.
*'''uploadurl:''' This should be set to the URL location of your "/limesurvey/upload" directory - or to a directory in which you would like LimeSurvey to use to serve uploaded files. This allow you to set uploaded files on another url domain.


=Расширенные настройки директорий=
=Расширенные настройки директорий=


*'''homeurl:''' This should be set to the URL location of your administration scripts. These are located in the /limesurvey/admin folder. This should be set to the WEB URL location - for example, ''http://www.example.com/limesurvey/html/admin''. Don't add a trailing slash to this entry. The default setting in config.php attempts to detect the name of your server automatically using a php variable setting - <code>{$_SERVER<nowiki>[</nowiki>'SERVER_NAME']}</code>. In most cases, you can leave this and just modify the remainder of this string to match the directory name you have put the LimeSurvey scripts in.
*'''publicurl:''' This should be set to the URL location of your 'public scripts'. The public scripts are those located in the "limesurvey" folder (or whatever name you gave to the directory that all the other scripts and directories are kept in). '''This settings is available in config.php and it is used when token emails are sent.'''
*'''tempurl:''' This should be set to the URL location of your "/limesurvey/tmp" directory - or to a directory in which you would like LimeSurvey to use to store temporary files, including uploads. This directory must be set to read & write for your webserver (e.g. chmod 755).
*'''imagefiles:''' By default, you should leave this pointing to the URL location of /limesurvey/admin/images - where the images are initially installed. You may, however, prefer to move these images to another location/ If this is the case, point this to the URL directory where they are stored.
*'''homedir:''' This should be set to the physical disk location of your administration scripts - for example "/home/usr/htdocs/limesurvey/admin". Don't add a trailing slash to this entry. The default setting in config.php attempts to detect the default root path of all your documents using the php variable setting  <code>{$_SERVER<nowiki>[</nowiki>'DOCUMENT_ROOT']}</code>. In most cases you can leave this and just modify the remainder of this string to match the directory name you have put the LimeSurvey scripts in.
*'''homedir:''' This should be set to the physical disk location of your administration scripts - for example "/home/usr/htdocs/limesurvey/admin". Don't add a trailing slash to this entry. The default setting in config.php attempts to detect the default root path of all your documents using the php variable setting  <code>{$_SERVER<nowiki>[</nowiki>'DOCUMENT_ROOT']}</code>. In most cases you can leave this and just modify the remainder of this string to match the directory name you have put the LimeSurvey scripts in.
*'''publicdir:''' This should be set to the physical disk location of your 'public scripts'.
*'''publicdir:''' This should be set to the physical disk location of your 'public scripts'.
*'''tempdir:''' This should be set to the physical disk location of your /limesurvey/tmp directory so that the script can read and write files.
*'''tempdir:''' This should be set to the physical disk location of your /limesurvey/tmp directory so that the script can read and write files.
*'''uploaddir:''' This should be set to the physical disk location of your /limesurvey/upload directory so that the script can read and write files.
*'''sCKEditorURL:''' url of the fckeditor script.
*'''sCKEditorURL:''' url of the fckeditor script.
*'''fckeditexpandtoolbar:''' defines if the fckeditor toolbar should be opened by default.
*'''fckeditexpandtoolbar:''' defines if the fckeditor toolbar should be opened by default.
*'''pdfexportdir:''' This is the directory with the tcpdf.php extensiontcpdf.php.
*'''pdfexportdir:''' This is the directory with the tcpdf.php extensiontcpdf.php.
*'''pdffonts:''' This is the directory for the TCPDF fonts.
*'''pdffonts:''' This is the directory for the TCPDF fonts.
= Other advanced settings=
== Upload files==
*'''allowedthemeuploads:''' File types allowed to be uploaded in theme editor
*'''allowedresourcesuploads:''' File types allowed to be uploaded in the resources sections, and with the HTML Editor
*'''allowedfileuploads''' {{NewIn|4.0.0}} Global restriction on file type to be uploaded
*'''magic_database:''' {{NewIn|3.17.17}} Allow to use a different MIME database for [https://www.php.net/manual/en/function.finfo-open.php finfo_open]. Can be updated only in config.php file. Example : <code>/usr/share/misc/magic.mgc</code> for redhat based linux.
*'''magic_file:''' {{NewIn|3.17.17}} Allow to use a different file to get the array of extension by mime type than the [https://github.com/LimeSurvey/LimeSurvey/blob/master/application/core/utils/fileExtensions.php included one]. Must be a PHP file return an array. Can be updated only in config.php file.
== Update ==
*'''updatable:''' This setting is in version.php. Can be true or false. If you set to true : when an super admin user log in : LimeSurvey checks if an update is available and show you a warning. If set to false : no check is done and you can't use ComfortUpdate.

Latest revision as of 16:59, 2 April 2024

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

The following section is addressed to those of you who would like to edit those configuration settings that could not be modified with the help of the GUI (Graphical User Interface) of the LimeSurvey installation. Please bear in mind that all the changes from the LimeSurvey root directory are done at your own risk. Nevertheless, in the case in which you are experiencing problems/need further guidance, join the discussion forums or the IRC channel for help from the LimeSurvey community.

Данные вариативные настройки могут быть найдены в файле application/config/config-defaults.php стандартной установки - некоторые из них используются только для первой установки и переопределены в Глобальных параметрах. Template:Внимание Все параметры в config.php переопределяют стандартные значения переменных указанные в config-defaults.php и некоторые их них переопределяются в Глобальных параметрах dialogTemplate:Newln. Таким образом намного проще обновить Вашу установку в будущем!

  If you want to change these settings, please do not change them in config-defaults.php, but copy the particular setting/line to /application/config/config.php in 'config'=>array( ) and change it there. All the newly modified/introduced settings from the config.php file will override the default values from config-defaults.php.


When an upgrade occurs, only the config-defaults.php settings are changed. Therefore, editing the config.php file will save your customized settings.

To update/add the LimeSurvey settings in /application/config/config.php, you have to update the config array:

    'config'=>array(
        'debug'=>0,
        'debugsql'=>0,
        'LimeSurveySetting'=>'New value', // Update default LimeSurvey config here
    )

Yii settings

LimeSurvey uses the Yii framework, which has its own configuration parameters in application/config/internal.php and application/config/config.php file. You can also access some specific configuration settings of LimeSurvey via the Yii configuration.

Since config.php array is merged to the whole config, you can replace any Yii params in the config.php file.

The Yii specific settings are set in the components array:

    'components' => array(
        'db' => array(
            ....
        ),
        'Specific settings'=>array(
            ....
        ),
    ),
For more information about the Yii framework, please access the following link.

Database settings

The database settings are written to config.php by the installer file when you install LimeSurvey for the first time. If needed, you can update this part of the config.php file. Please remember that you do this at your own risk! See also the Yii documentation and please remember that LimeSurvey supports only the following types of database: mysql, pgsql, dblib, mssql, and sqlsrv.

Session settings

You can set some session parameters in config.php (check the two examples from below). You can uncomment/add the part needed in config.php. See the Yii Documentation for other settings.

  If you need to update session settings to have multiple LimeSurvey instances running on the same server, check if you don't have to update request settings for crsf cookie.


Use table-based sessions

LimeSurvey can use table-based sessions, you find a commented part on the default config.php generated file. To use table-based session, remove the // before each line.

        'session' => array (
            'class' => 'application.core.web.DbHttpSession',
            'connectionID' => 'db',
            'sessionTableName' => '{{sessions}}',
        ),
  Table-based sessions are currently not supported on MSSQL server.


Other sessions update

If you use SSL ('https') for your LimeSurvey installation, adding the following lines to your config.php will increase the security of the session:

        // Set the cookie via SSL
        'session' => array (
            'cookieParams' => array(
                    'secure' => true, // use SSL for cookies
                    'httponly' => true // Cookies may not be used by other protocols - experimental
                ),
            ),

If you want to fix the domain for a cookie, use the following syntax in config.php:

        // Set the domain for cookie
        'session' => array (
            'cookieParams' => array(
                    'domain' => '.example.org',
                ),
            ),

If you have mutiples installation on the same server, it can be more quick and easy to set different session name for each LimeSurvey instance. This can be need for IE11 in some condition (see issue 12083)

        // Set the name of the session
        'session' => array (
            'sessionName' => "LimeSurveyN1",
            ),

Request settings

The request settings are important, but the default settings are already optimized for LimeSurvey usage. To read more about them, see the Yii Documentation.

For example, the LimeSurvey request settings configuration may be modified in the following way (at your own risk) :

        // Disable CSRF protection
        'request' => array(
            'enableCsrfValidation'=>false,    
            ),
        // Enforce a certain URL base 
        'request' => array(
            'hostInfo' => 'http://www.example.org/'  
            ),
        // Set the cookie domain name and path for CSRF protection, path is used if you have different instance on same domain
        'request' => array(
            'csrfCookie' => array( 
                'domain' => '.example.com',
                'path' => '/limesurvey/',
            )
        ),

If you need to update only the url for token emails, set your publicurl in your config.php file.


Allow usage of session and Csrf Validation in iFrame (New in 3.24.3 )

After allow Iframe embedding you need to update some configuration part.

  Attention, even with all settings : allow form in iframe can broke on some browser or with user specific settings. This settings was tested with Firefox 81.0.2 to 115 and Chromium 85.0.4183.121 to 119, and119 Edge with default settings. No support on this feature, only community support.


Allow session start in iframe

The session needs to be secure (valid https) , httponly and samesite to None. All settings must be set to all lowercase.

 		 'session' => array (
			'sessionName'=>'LS-VBXZZORFJZCAKGYI',
			// Uncomment the following lines if you need table-based sessions.
			// Note: Table-based sessions are currently not supported on MSSQL server.
			// 'class' => 'application.core.web.DbHttpSession',
			// 'connectionID' => 'db',
			// 'sessionTableName' => '{{sessions}}',
			'cookieParams' => array(
				'secure' => true,
				'httponly' => true,
				'samesite' => 'None',
			),
		 ),

Allow csrf cookie in iframe

Same as session: must be secure and sameSite set to None. The whole array must be added at the same level as session.

		'request' => array(
			'enableCsrfValidation'=>true,
			'csrfCookie' => array(
				'sameSite' => 'None',
				'secure' => true,
			),
		),

URL settings

  If you need to update only the url for token and other emails, set your publicurl in your config.php file.


To change the default URL settings, update the urlManager:

       // Use short URL
		'urlManager' => array(
			'urlFormat' => 'path',
			'showScriptName' => false,
		),


You can also add .html after the survey id in the following way:

       // Use short URL
		'urlManager' => array(
			'urlFormat' => 'path',
			'rules' => array (
			    '<sid:\d+>' => array('survey/index','urlSuffix'=>'.html','matchValue'=>true),
			 ),
			'showScriptName' => false,
		),

For more information, check the Yii documentation.

Logging settings

Yii provides different solutions to generate logs. To find out more about them, check the logging special topic. LimeSurvey uses '1' or '2' by default, which allows every web user to see the logs. You can create your own settings using Yii directly.

For example, a quick solution to log errors and warnings in files is:

return array(
	'components' => array(
		/* Other component part here 'db' for example */
		'log' => array(
			'routes' => array(
				'fileError' => array(
					'class' => 'CFileLogRoute',
					'levels' => 'warning, error',
					'except' => 'exception.CHttpException.404',
				),
			),
		),
		/* Other component part here 'urlManager' for example */
	),
	/* Final part (with 'runtimePath' 'config' for example) */
);
 Hint: The file is saved by default to limesurvey/tmp/runtime/application.log, which is located in the LimeSurvey root folder.
  Yii uses runtime path. By default, the logs are web accessible. They may contain a lot of information from your server. It is better to use a directory that cannot be accessed via the web. You can set it in routes or by updating the Runtime path.

.

Runtime path

The runtime path must be a readable and writable directory for the “web user”. However, the runtime path contains files with potential security information that are located in the public web access area. LimeSurvey collects these files in the temp directory of the LimeSurvey root directory. In order to eliminate the access to such important data, you can set the runtime path outside the public web access by editing the respective lines in the /application/config/config.php file:

 
return array(
  'components' => array(
    []
    'runtimePath'=>'/var/limesurvey/runtime/',
    'config'=>array(
    []
    )
  )
)

Общие настройки

  • sitename: Определяет имя Вашего сайта опросов. Это имя отображается в обзоре списка опросов и шапке административной панели. Этот параметр переопределяется в Общие настройки Template:Newln.
  • siteadminemail: Это стандартный адрес почты Администратора и используется для системных сообщений и опций контакта. Этот параметр переопределяется в Общие настройки Template:Newln.
  • suteadminbounce: Это адрес для пришедших возвратов. Этот параметр переопределяется в Общие настройки Template:Newln.
  • siteadminname: Это реальное имя Администратора сайта. Этот параметр переопределяется в Общие настройки Template:Newln.

Безопасность

  • surveyPreview_require_Auth: истинно по-умолчанию. Если вы установите в значение "ложь", то любой человек может тестировать Ваш опрос воспользовавшись URL - без авторизации и без предварительной активации опроса. Этот параметр переопределяется в Общие настройки Template:Newln.
  • usercontrolSameGroupPolicy: истинно по-умолчанию. По-умолчанию, не привилегированные пользователи в LimeSurvey могут видеть только пользователей, которых они создали или пользователей принадлежащих той же группе в которую входят они сами. Вы можете отключить данную возможность.
  • filterxsshtml: Данный параметр включает фильтрацию подозрительных HTML-тегов в опросах, группах вопросов, вопросах и текстовых ответах в административном интерфейсе. Данный параметр стоит выключить лишь в том случае, если Вы полностью доверяете людям осуществляющим администрирование LimeSurvey и если Вы хотите позволить этим людям использовать Javascript, Flash-ролики, и т. д. Супер-администратор никогда не фильтруется на подозрительные HTML-теги.. Этот параметр переопределяется в Общие настройки Template:Newln.
  • demoModeOnly: Если данный параметр включен, то LimeSurvey перейдет в demo-режим. Демо-режим влияет на следующие вещи:
    • Отключает возможность изменения пароля администратора и прочих параметров его учетной записи
    • Отключает выгрузку файлов в редактор шаблонов
    • Отключает рассылку почтовых приглашений и напоминаний
    • Отключает возможность дампа базы данных
    • Отключает возможность сохранения следующих глобальных параметров: имя сайта, язык по-умолчанию, режим HTML-редактора по-умолчанию, XSS фильтр

Ресурсы

  • sessionlifetime: Определяет время в секундах после истечения которого сессия считается просроченной. По-умолчанию: $sessionlifetime = 3600;. Этот параметр переопределяется в Общие настройки Template:Newln.
  • memorylimit: Устанавливает количество памяти к которой имеет доступ LimeSurvey. '32' (M=MiB) минимальное рекомендуемое значение. Если Вы получаете ошибки по истечению времени ожидания или проблемы с генерацией статистики или экспортом файлов, то попробуйте увеличить данный лимит до '128' или '256'.
Пожалуйста, обратите Ваше внимание на то, что такие локальные параметры приложения могут всегда быть переопределены глобальными настройками сервера.

Для увеличения лимита памяти до 128M (MiB) Вам необходимо добавить:

  • memory_limit = 128M в php.ini Вашего сервера (рекомендовано, если Вы имеете туда доступ)
  • memory_limit = 128M в php.ini файл корневой директории LimeSurvey
  • php_value memory_limit 128M в .htaccess файл корневой директории LimeSurvey
  • max_execution_time: Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. To be allowed to export big survey data and statistics, LimeSurvey try to set it by default to 1200 seconds. You can set a bigger time or a lower time if needed. Only accessible via php config file.

Отображение

  • $lwcdropdowns: (Obsolete since 2.0) Возможные значения: "L" или "R". Установка на "R" даст в результате отображение вопросов типа 'Список с комментариями' как радио кнопки, в то время как "L" даст в результате отображение вопросов типа 'Список с комментариями' как 'выпадающий список'.
  • $dropdownthreshold: Если Вы выбрали "R" для $dropdowns, это позволит Вам установить максимальный порог количества вариантов которые будут отображаться как радио-кнопки, перед превращением в выпадающий список. Если у Вас имеется вопрос с большим числом вариантов, то их отображение как радио-кнопок может выглядеть громоздко и нелогично для пользователей. Установка на максимум (25 - по-умолчанию) означает, что чем больше список тем быстрее его заполнять для участников опроса.
  • $repeatheadings: У вопросов типа "Массив" зачастую имеется большое количество вариантов ответов, которые при отображении занимают более чем одну страницу. Данный параметр позволяет Вам решать как много вариантов ответов будет показано прежде чем повторятся заголовки массива с информацией о вопросе. Хорошим выбором будет установка данного параметра в значение равное 15. Если же Вы не хотите повторять заголовки, установите значение параметра равное нулю (которое является значением по-умолчанию).
  • $minrepeatheadings: Минимальное количество ответов, которое требуется перед повторением заголовков в вопросе типа "Массив".
  • $addTitleToLinks: Если данный параметр включен, то LimeSurvey будет добавлять html элемент 'title' ко всем ссылкам используемым в меню. Это поможет экранным считывателям анализировать меню. Включайте данный параметр только если Вы используете экранный считыватель потому что он пересекается с подсказками.
  • $defaulttemplate: Эта настройка определяет тему по-умолчанию, используемую в 'публичном списке' опросов. Этот параметр переопределяется в Общие настройки Template:Newln.
  • $defaulthtmleditormode: Устанавливает режим по-умолчанию для интегрированного HTML-редактора. Этот параметр переопределяется в Общие настройки Template:Newln. Действительные параметры: inline (по-умолчанию), popup and none:
    • inline: Встроенная замена полей HTML-редактором. Обладает дружеским интерфейсом, но медленный в исполнении.
    • popup: Добавляет значок который вызывает всплывающее меню HTML-редактора. Быстрее, но в форме отображается html-код.
    • none: без HTML-редактора.

Язык и Время

  • $defaultlang: Устанавливает основной язык используемый в административных скриптах, а также настраивает основной язык в публичных опросах. Вы можете изменить данный параметр для публичных опросов на опрос-опрос базе с помощью административных скриптов. Этот параметр переопределяется в Общие настройки Template:Newln.
  • $timeadjust: Если Ваш web-сервер в отличной временной зоне от местоположения где проводятся Ваши опросы, поместите разницу между Вашим сервером и Вашей домашней временной зоной здесь. Например, Я живу в Австралии, но сервер находится в США. У Web-сервера разница с моей временной зоной в 14 часов. Таким образом, параметр необходимо установить равным "14". Другими словами, данный параметр добавляет 14 часов ко времени web-сервера. Этот параметр особенно важен для временных штампов вопросов и ответов. Этот параметр переопределяется в Общие настройки Template:Newln.
  • $modrewrite: (Obsolete since 2.0) Если установлено в 1, то активирует возможность переписывания URL особым способом (Например: http://survey.example.com/123456/lang-fr/tk-sdlfkjozeiru в отличие от http://survey.example.com/index.php?sid=123456⟨=fr&token;=sdlfkjozeiru). Прежде чем Вы активируете этот параметр, Вы должны переименовать файл из "htaccess.txt" в ".htaccess". Вам необходим Web-сервер Apache с корректно установленным модулем mod_rewrite.

Поведение опросов

  • $allowmandbackwards: Если данной переменной присвоить значение 1, то это позволит участникам опроса возвратиться к предыдущим вопросам даже если они не отвечали на текущие обязательные вопросы. Если же присвоено значение 0, то участники должны ответить на текущие обязательные вопросы, чтобы перейти к предыдущим.
  • $deletenonvalues: Пользуйтесь данной возможностью с присущей осторожностью. По-умолчанию (значение 1) все нелогичные ответы в базе данных затираются на NULL. Это позволяет быть уверенным в том, что данные в Вашей базе хранятся должным образом. Хотя, в некоторых случаях, возможно, Вам понадобится сохранить некорректные ответы в базе данных. Для этого Вам необходимо присвоить значение переменной 0. Давайте представим, что в своем опросе Вы спросили у участника его пол и тот указал ошибочно 'женский' и в дальнейшем пошел по ветке вопросов присущих женщинам. Когда участник понял свою ошибку он возвращается, меняет пол на 'мужской' и продолжает опрос. Теперь ответы на 'женские' вопросы становятся некорректными для данного участника. Если переменная равна 1, то такие данные немедленно очищаются (NULL) в базе данных. Если же значение переменной равно 0, то его ответы остаются в базе и Вы можете их видеть при ее анализе.
  • $shownoanswer: Когда вопрос типа радио-кнопка/список содержащий редактируемые поля (т.е. список, массив вопросов) не обязателен к ответу и $shownoanswer установлено в 1, то показывается дополнительный вариант ответа "N/A" - который означает "Нет ответа", чтобы участники могли не отвечать на данный вопрос. Некоторые предпочитают, чтобы данная возможность не была доступна. Установка переменной в 0, отключает данную возможность. Параметр переопределяется в диалоговом окне Общие настройки Template:Newln.
  • $printanswershonorsconditions: Данная настройка определяет будут ли отображаться вопросы, которые были скрыты согласно условия. (По-умолчанию: 1 = скрывать ответы на вопросы скрытые по условию).
  • $hide_groupdescr_allinone: (New in 1.85RC3 ) Данная настройка предназначена для опросов "все в одном" содержащих условия. Когда она включена имя группа и ее описание, а также все условия в группе скрыты. (По-умолчанию: истина (скрыть имя группы, описание, когда все условия в группе скрыты по условию)).
  • $showpopups: Показывать всплывающие окна сообщений если обязательный или вопрос с условием не был отвечен корректно. 1=показывать всплывающие окна сообщений (по-умолчанию), 0=показывать сообщения внутри текущего окна, -1=не показывать сообщения совсем (в таком случае пользователи будут видеть специфичные для вопроса подсказки, сообщающие о том, на какой вопрос необходимо ответить).

Numerical question type behavior

  • bFixNumAuto: Numeric fields can be automatically filtered to remove all non numeric values. By default this is enable, you can disable it globally. This settings is related to Fix automatically numeric value in core theme options. It was enable for Yes, disable for Only for expression and No.
  • bNumRealValue: Numeric fields used in expression manager can be fixed or not. It's fixed by default. If NUMERIC is a numerical question : disable or 0 : {NUMERIC} with bad caracters send '', enable or 1 : {NUMERIC} send all character entered. This settings is related to Fix automatically numeric value in core theme options. It was enable for Yes and Only for expression and disable for No.

Разработка

  • $debug: Включив эту настройку Вы активируете отчеты об ошибках PHP в режим E_ALL (показывать все). Это значит, что малейшие примечания возникающие в скриптах будут отображены. Настройка должна быть выставлена в значение 1 если вы пытаетесь отладить приложение по какой либо причине, если же Вы являетесь разработчиком, то переключите в 2. Не включайте режим отладки (1 или 2) на боевой машине, т.к. это предоставит дополнительную информацию третьим лицам.(По-умолчанию: 0)

In the case in which you experience an error in the application, we strongly recommend to activate the debug setting in order to get a more detailed error that you can submit with the bug report:

    'config'=>array(
        'debug'=>2,
        'debugsql'=>0,
    )

If you work on plugin and need a quick way to dump variables on screen : you can use traceVar function. If debug is set : this function use CWebLogRoute to be shown on HTML page. Usage traceVar($MyVariable)

Настройки электронной почты

Примечание:

Данные настройки определяются в диалоговом окне общих настроек  (New in 1.87 ).
  • $emailmethod: Данный параметр определяет как будет отправлено письмо. Доступны следующие варианты отправки:
    • mail: с помощью PHP
    • sendmail: с помощью почтового сервера sendmail
    • smtp: с помощью релея SMTP. Данный способ предпочтителен тогда, когда LimeSurvey установлен на узел не являющийся Вашим почтовым сервером.
  • $emailsmtphost: Если Вы пользуетесь 'smtp' как $emailmethod, то Вы можете записать сюда адрес Вашего сервера. Если же Вы пользуетесь почтой от Google, то Вам необходимо дополнительно указать порт наподобие как здесь: $emailsmtphost = 'smtp.gmail.com:465';
  • $emailsmtpuser: Если Ваш SMTP-сервер запрашивает аутентификацию, то укажите здесь имя пользователя, в противном случае оставьте пустым.
  • $emailsmtppassword: Если Ваш SMTP-сервер запрашивает аутентификацию, то укажите здесь пароль, в противном случае оставьте пустым.
  • $emailsmtpssl: Установите здесь 'ssl' или 'tls' чтобы устанавливать SSL/TLS SMTP-соединение.
  • $maxemails: При рассылке приглашений или напоминаний данный параметр определяет какое количество писем может быть отправлено за раз. Различные web-серверы имеют различные почтовые емкости и если Ваш скрипт очень долго отправляет письма, то существует риск, что он завершится с ошибками (превышено время выполнения скрипта). Большинство web-серверов могут отправлять по 100 писем за раз в течение 30 секунд (ограничение для PHP-скрипта). Если у Вас возникли проблемы с отправкой писем и сыпятся ошибка с превышением времени ожидания выполнения скрипта, то советуем Вам уменьшить значение данного параметра. Кликнув по кнопке 'Отправить приглашение по e-mail' на панели управления ключами доступа (не по кнопке справа от каждого ключа доступа!), будет отправлено максимальное количество писем-приглашений, затем будет отображен список адресатов и предупреждение "Ожидается отправка писем большего количества, чем может быть отправлено за раз. Продолжить отправку сообщений можно нажав кнопку ниже. Имеется ### писем к отправке." и предложение нажать кнопку "Продолжить", чтобы приступить к рассылке следующей партии писем. Т.е. пользователю предоставляется право решать, когда будет отправлена следующая партия писем. Не обязательно оставлять данный экран активным. Администратор может выйти из системы и вернуться назад позднее, чтобы разослать следующую партию приглашений.

Обзор статистики и ответов

  • usejpgraph: (Obsolete since 1.8) JPGraph-библиотека позволяет Вам отображать результаты опросов в разделе Статистика системы LimeSurvey в виде столбцов и круговых диаграмм. Если Вы правильно настроили jpgraph на Вашем сервера, то Вы можете включить эту возможность (1=вкл., 0=выкл.). Удостоверьтесь, что на сервере стоит минимально необходимая версия PHP для конкретной версии JPGraph! В настоящее время данная возможность находится в стадии разработки, поэтому не удивляйтесь если получили странные результаты.
  • jpgraphdir: (Obsolete since 1.8) Расположение скриптов jpgraph на диске. Данная опция требуется только тогда, когда $usejpgraph установлено в 1.
  • jpgraphfont: (Obsolete since 1.8) Параметр определяющий шрифт используемый в графиках. Полностью рабочий вариант: "FF_FONT1"
  • embedded: (Obsolete since 2.0) Если Вы хотите интегрировать LimeSurvey в другую страницу, то необходимо отключить отправку HTML-заголовков используя данную настройку и точки в заголовках методов пользовательских функций. Это грязный хак, но, тем не менее, должно помочь при быстрой интеграции.
  • filterout_incomplete_answers: Для управления поведением по-умолчанию при фильтрации незавершенных ответов во время обзора ответом см. Обзор результатов опроса. Поскольку данные записи могут нарушить статистику, варианты переключения данного параметра в графическом интерфейсе следующие (этот параметр в config.php установлен по-умолчанию для незавершенных ответов):
    • show: Показывать все ответы
    • filter: Показывать только завершенные ответы
    • incomplete: Показывать только незавершенные ответы
  • strip_query_from_referer_url: Данный параметр определяет будут ли сохраняться параметры из партнерских ссылок или нет. По-умолчанию "false" (в этом случае сохраняются все параметры). Альтернативой этому может быть установка значения "true" и часть ссылки с параметрами будет отсекаться.
  • showaggregateddata: (New in 1.8 ) При активации данного параметра будут дополнительно показаны среднее арифметическое и среднее отклонение в статистике. Кроме того собираются для быстрого просмотра т.е. результаты диапазона 1+2 и 4+5 складываются, чтобы иметь общий ранг "хорший" (1/2), "средний" (3) и "плохой" (4/5). Это относится только к вопросам типа "A" (массив с пятибальной шкалой) и "5" (выбор из пяти вариантов).
  • PDF Export Settings: (New in 1.85 ) Эта возможность активирует экспорт в PDF для печатных форм опросов и печати ответов. Экспорт в PDF - экспериментальный. Итоговый вывод не красивый. По этому вопросу отсутствует всяческая поддержка - свяжитесь с нами если Вы хотите помочь нам в этом.
    • usepdfexport: Установите 0 для выключения; 1 для включения
    • pdfdefaultfont: Шрифт используемый по-умолчанию
    • pdffontsize: Размер шрифта для нормального текста; Заголовок опроса +4; заголовок группы +2
    • notsupportlanguages = Массив не поддерживаемых языков: array('zh-Hant-TW','zh-Hant-HK','zh-Hans','ja','th');
    • pdforientation: Ориентация PDF. Установите L для ландшафтного или P для портретного формата
  • $showsgqacode: (New in 1.91 ) Эта настройка используется для возможности печати опроса {IMG(attId="78",height="16",width="16")} и по-умолчанию false. Если Вы установите showsgqacode = true; то будут отображены ID каждого вопроса и ответа; данные идентификаторы совпадают с заголовками столбцов в таблице Lime_survey_12345 которая содержит данные конкретного опроса. Эти идентификаторы могут быть использованы как код книги для ручных запросов к базе данных.
  • {IMG(attId="79",height="200",width="400")}

Настройки LDAP

Т.к. данная тема весьма и весьма обширна, то мы переместили Настройки LDAP на другую страницу.

Аутентификация

В LimeSurvey 2.05 аутентификация осуществляется при помощи плагинов. В связи с этим данная информация может быть устаревшей. См. Плагины для получения свежей информации.

Передача проверки подлинности Web-серверу

Системные администраторы могут желать, чтобы их "администраторы опросов" проходили централизованную проверку подлинности системы (Active Directory, openLDAP, Radius, ...), без участия локальной базы данных LimeSurvey. Простой способ для осуществления данной возможности - настройка Web-сервера на использование внешней системы аутентификации и настройка LimeSurvey доверять аутентификацию Web-серверу. Для активации данной возможности Вам необходимо:

  • установить auth_webserver равным 'true' в файле config.php
  • включить аутентификацию на стороне сервера

Обратите внимание на то, что:

  • LimeSurvey будет обходить собственную процедуру аутентификации процесса (используя имя переданное web-серверу без запроса пароля)
  • это может заменить графический интерфейс аутентификации системы не приглашение в систему опроса (интерфейс участника)

Передача аутентификации без автоматического импорта пользователей

Обратите внимание на то, что по-умолчанию Передача аутентификации не обходит систему авторизации: это означает, что хоть Вам и не нужно управлять пользовательскими паролями в системе, все равно необходимо завести пользователей в базу LimeSurvey и присвоить им необходимые наборы прав доступа к определенным ресурсам.

Пользовательский доступ будет гарантировано предоставлен только в случае:

  • если он прошел аутентификацию на Web-сервере
  • если он имеет такой же логин в локальной базе данных LimeSurvey (с присущими ему привилегиями)

Передача аутентификации с автоматическим импортом пользователей

При управлении огромной базой данных пользователей, иногда становится проще импортировать его в локальную базу данных LimeSurvey.

  • auth_webserver_autocreate_user: если равно 'true', то LimeSurvey будет производить автоматический импорт пользователей прошедших аутентификацию на Web-сервере, но не находящихся в локальной базе данных
  • auth_webserver_autocreate_profile: массив описывающий профиль по-умолчанию, который будет присвоен пользователю (в т.ч. поддельные Имя, Фамилию, email, привилегии)

Если Вы хотите настроить профиль пользователя так, чтобы он совпадал с вошедшим в систему пользователем, то Вам придется разработать простую функцию под названием hook_get_autouserprofile: с помощью которой Вы сможете получить данные из центральной базы данных пользователей (к примеру, из LDAP каталогов), настоящие Имя и Фамилию, и email текущего пользователя. Также Вы можете настроить его привилегии в системе основываясь на его принадлежности к группам во внешней базе данных.

Функция hook_get_autouserprofile берет логин пользователя в качестве своего единственного аргумента и возвращает:

  • False или пустой массив: в случае если пользователю запрещен доступ в LimeSurvey
  • массив содержащий все общие атрибуты пользовательского профиля как описано в $WebserverAuth_autouserprofile
function hook_get_auth_webserver_profile($user_name)
{
     // Retrieve user's data from your database backend (for instance LDAP) here
     ... get $user_name_from_backend
     ... get $user_email_from_backend
     ... get $user_lang_from_backend
     ... from groups defined in your backend set $user_admin_status_frombackend_0_or_1
     return Array(
                     'full_name' => "$user_name_from_backend",
                     'email' => "$user_email_from_backend",
                     'lang' => '$user_lang_from_backend',
                     'htmleditormode' => 'inline',
                     'templatelist' => 'default,basic,MyOrgTemplate',
                     'create_survey' => 1,
                     'create_user' => 0,
                     'delete_user' => 0,
                     'superadmin' => $user_admin_status_frombackend_0_or_1,
                     'configurator' =>0,
                     'manage_template' => 0,
                     'manage_label' => 0);
}

     // If user should be denied access, return an empty array

     // return Array();
  The optionnal 'hook_get_auth_webserver_profile' function is for advanced user usage only! For further details, please read the comments from the config-defaults.php file.


Сопоставление имен пользователей

В случае, если имя пользователя во внешней базе отличается от имени в локальной базе LimeSurvey, Вы можете найти полезной использование функции сопоставления имен пользователей. В LimeSurvey это осуществляется за счет использования параметра auth_webserver_user_map. Представим себе, что у Вас во внешней базе отсутствует пользователь с именем 'admin'. Чтобы в дальнейшем иметь возможность войти в LimeSurvey как admin, Вам необходимо сопоставить имя пользователя во внешней базе (пусть это будет 'myname') с логином 'admin' в LimeSurvey. Соответствующие этому настройки:

'config'=>array(
...
'auth_webserver_user_map' => array ('myname' => 'admin');
)

После успешной аутентификации на Web-сервере с использованием логина 'myname' и пароля, Вы будете напрямую авторизованы в LimeSurvey как пользователь 'admin'.

Очевидно, что данная процедура имеет определенные последствия в плане безопасности, так что применяйте это с осторожностью, и, пожалуйста, защитите Ваш config.php от записи Web-сервером.

Использование одноразовых паролей

Пользователь может запросить у LimeSurvey логин и одноразовый пароль (ранее записанный в таблице `users` и столбце `one_time_pw`) в /limesurvey/admin при помощи внешнего приложения.

Данный параметр должен быть включен (use_one_time_passwords => true) для разрешения использования одноразовых паролей (по-умолчанию = false). Больше информации может быть найдено

More information can be found in the "Manage Users" section.


Encryption settings (New in 4.0.0 )

  Attention : Once set, encryption keys should never be changed, otherwise all encrypted data could be lost !


When update or install, this parameters was generated by LimeSurvey and set in application/config/security.php file. You can move this settings in config.php if you want or leave in security.php.

See data encryption for detail on this feature.

  • encryptionkeypair
  • encryptionpublickey
  • encryptionsecretkey

Advanced url settings

  • publicurl: This should be set to the URL location of your 'public scripts'. The public scripts are those located in the "limesurvey" folder (or whatever name you gave to the directory that all the other scripts and directories are kept in). This settings is available in config.php and it is used when LimeSurvey need an absolute url (for example when token emails are sent).
  • homeurl: This should be set to the URL location of your administration scripts. These are located in the /limesurvey/admin folder. This should be set to the WEB URL location - for example, http://www.example.com/limesurvey/html/admin. Don't add a trailing slash to this entry. The default setting in config.php attempts to detect the name of your server automatically using a php variable setting - {$_SERVER['SERVER_NAME']}. In most cases, you can leave this and just modify the remainder of this string to match the directory name you have put the LimeSurvey scripts in.
  • tempurl: This should be set to the URL location of your "/limesurvey/tmp" directory - or to a directory in which you would like LimeSurvey to use to serve temporary files.
  • uploadurl: This should be set to the URL location of your "/limesurvey/upload" directory - or to a directory in which you would like LimeSurvey to use to serve uploaded files. This allow you to set uploaded files on another url domain.

Расширенные настройки директорий

  • homedir: This should be set to the physical disk location of your administration scripts - for example "/home/usr/htdocs/limesurvey/admin". Don't add a trailing slash to this entry. The default setting in config.php attempts to detect the default root path of all your documents using the php variable setting {$_SERVER['DOCUMENT_ROOT']}. In most cases you can leave this and just modify the remainder of this string to match the directory name you have put the LimeSurvey scripts in.
  • publicdir: This should be set to the physical disk location of your 'public scripts'.
  • tempdir: This should be set to the physical disk location of your /limesurvey/tmp directory so that the script can read and write files.
  • uploaddir: This should be set to the physical disk location of your /limesurvey/upload directory so that the script can read and write files.
  • sCKEditorURL: url of the fckeditor script.
  • fckeditexpandtoolbar: defines if the fckeditor toolbar should be opened by default.
  • pdfexportdir: This is the directory with the tcpdf.php extensiontcpdf.php.
  • pdffonts: This is the directory for the TCPDF fonts.

Other advanced settings

Upload files

  • allowedthemeuploads: File types allowed to be uploaded in theme editor
  • allowedresourcesuploads: File types allowed to be uploaded in the resources sections, and with the HTML Editor
  • allowedfileuploads (New in 4.0.0 ) Global restriction on file type to be uploaded
  • magic_database: (New in 3.17.17 ) Allow to use a different MIME database for finfo_open. Can be updated only in config.php file. Example : /usr/share/misc/magic.mgc for redhat based linux.
  • magic_file: (New in 3.17.17 ) Allow to use a different file to get the array of extension by mime type than the included one. Must be a PHP file return an array. Can be updated only in config.php file.

Update

  • updatable: This setting is in version.php. Can be true or false. If you set to true : when an super admin user log in : LimeSurvey checks if an update is available and show you a warning. If set to false : no check is done and you can't use ComfortUpdate.