Actions

Installation FAQ/ru: Difference between revisions

From LimeSurvey Manual

(Created page with "'''Если строка mbstring не найдена''', то Вы можете получить кучу проблем.")
(Created page with "Три возможных сценария развития событий: *Если Вы пользуетесь услугой сервис-провайдера(систем...")
Line 40: Line 40:
'''Если строка mbstring не найдена''', то Вы можете получить кучу проблем.
'''Если строка mbstring не найдена''', то Вы можете получить кучу проблем.


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


==When I am entering special chars (Chinese, Cyrillic, Greek, Arabic) into my survey, every character is shown as a question mark?==
==When I am entering special chars (Chinese, Cyrillic, Greek, Arabic) into my survey, every character is shown as a question mark?==

Revision as of 04:53, 17 May 2015

Содержание:

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

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

Вам необходимо ввести приведенные ниже команды в консоль MySQL.

create database <your_database_name>;

create user <your_database_username>;

create user <your_database_username>@localhost;

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

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

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

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

Вам необходимо подменить данные: <your_database_name>, <your_database_username> и <your_database_password> в приведенных командах на свои значения.

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

Обычно, новую базу данных и структуру таблиц создает скрипт. Однако, если Ваш провайдер/сервер не дает Вам прав на создание базы данных в MySQL, то Ван нужно связаться с системным администратором для создания необходимой базы (или создать ее самостоятельно). Они должны создать пустую базу данных для Вас с соответствующими правами доступа (т.е.: чтение/запись/создание). Начните обычную установку LimeSurvey и система создаст таблицы в существующей базе.

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

Mbstring это PHP-библиотека, которая преобразовывает кодировки разных языков из одной в другую. Она понадобится, если Вы хотите развернуть у себя LimeSurvey. Чтобы проверить, установлена ли данная библиотека, перейдите по ссылке

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

в браузере. Будет отображено великое множество информации. В секции Конфигурация найдите строку 'mbstring'.

Если такая строка найдена, то можете смело продолжать установку.

Если строка mbstring не найдена, то Вы можете получить кучу проблем.

Три возможных сценария развития событий:

  • Если Вы пользуетесь услугой сервис-провайдера(система находится на внешнем хостинге): то поинтересуйтесь у него как можно активировать данную библиотеку в PHP или же пусть он сам ее активирует - если у Вас достаточно мощная панель управления хостингом, то Вы можете самостоятельно сделать это.
  • Если система развернута на Вашем личном сервере Linux: Вы можете произвести повторную компиляцию PHP, включив в него библиотеку mbstring. Спросите у людей разбирающихся в Linux как сделать это. В большинстве версий Linux имеющихся на сегодня Вы можете установить все с помощью менеджера пакетов.
    • Если Вы пользуетесь системой на базе пакетов поддерживающих 'yum' (CentOS, RedHat, Fedora):
      1. Используйте терминал (от root-а) и введите: yum install php-mbstring
      2. Убедитесь в том что обновился файл /etc/php.ini и в нем имеются строки с параметрами mbstring (без комментариев в начале строки).
      3. Убедитесь, что перезагрузили apache после установки: /etc/init.d/httpd restart
  • Если же все развернуто на Вашем сервере Windows: Найдите php.ini в Вашей системе, откройте его любым редактором и найдите mbstring. Скорее всего большинство строк с данным словом будет закомментировано и Вам необходимо будет раскомментировать их. Удалите тточку с запятой, сохраните файл и перезагрузите web-сервер.

When I am entering special chars (Chinese, Cyrillic, Greek, Arabic) into my survey, every character is shown as a question mark?

This happens if your database itself is not created to use an UTF-8 charset. This can happen when you have to create the database using a provider administration panel. You can fix this problem by executing the following SQL command on your database (using for example phpMyAdmin)

ALTER DATABASE `<your_database_name>` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Replace <your_database_name> with the name of your database. You need to do this before installing LimeSurvey.

Blank page when accessing the Install page

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

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

session.save_path="/temp"
  • Verify your server runs a suitable PHP version (e.g. this "blank page" problem appeared with PHP v4.4 and LimeSurvey v2.00+).

Error messages because of non-existing resources

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

Solution: Re-upload all files using the binary mode of your FTP program.

After database creation

Blank page after database creation

Symptoms

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

Fix

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

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

Symptoms

  • LimeSurvey installed OK and database was created. But when you access the admin page, the browser keeps running and will eventually fail to show the page.
  • When you check the web server access log, its size has become so big (in some cases, more than 2 GB).
  • Inside the access log, you get this message filling the log.

Warning: fread() [function.fread]: Length parameter must be greater than 0 in /limesurvey/classes/php-gettext/streams.php on line 120

Note: line number may be different depending on your LimeSurvey version.

Fix

This may be caused by the mbstring.func_overload setting. Check the setting in your php.ini and set as the following.

mbstring.func_overload = 0

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

When accessing admin page, the browser reports Fatal error: Call to a member function gT() on a non-object in login_check.php on line 76

Symptoms

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

Note: Other characters may also induce the same behaviour

Fix

Move / rename the limesurvey installation directory so that pathname does not include either the ( or ) characters

After installation

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