Instalacja FAQ
From LimeSurvey Manual
Contents:
During installation
How can I create a database and a user in mysql with command line access?
You have to enter the below commands in your mysql.
create database <your_database_name>;
create user <your_database_username>;
create user <your_database_username>@localhost;
set password for <your_database_username> = PASSWORD('<your_database_password>');
set password for <your_database_username>@localhost = PASSWORD('<your_database_password>');
grant all on <your_database_name>.* to '<your_database_username>';
grant all on <your_database_name>.* to '<your_database_username>'@'localhost';
You have to replace <your_database_name>, <your_database_username> and <your_database_password> in above commands with according values.
Co jeśli nie można stworzyć bazy za pomocą skryptu?
W wielu przypadkach skrypt utworzy bazę danych i później strukturę tabel. Jednakże gdy Twój serwer/provider nie pozwala na tworzenie baz przez skrypty, musisz ją utworzyć ręcznie w panelu administracyjnym serwera lub skontaktować się z osobą administrująca hosting. Należy również zdefiniować użytkownika z prawami dostępu do bazy danych (np: read/write/create). Wprowadź nazwę bazy danych, nazwę użytkownika oraz jego hasło do pliku config.php, a następnie uruchom skrypt instalacyjny z lokalizacji /admin/install/index.php, który utworzy pożądaną strukturę tabel w Twojej bazie danych.
Co to za rozszerzenie mbstring (Multibyte String Functions) i do czego służy?
Biblioteka mbstring jest rozszerzeniem języka PHP pozwalającym na konwertowanie znaków wprowadzonych w języku jednego kraju na języki krajów innych. Rozszerzenie to jest wymagane do poprawnego działania LimeSurvey. Aby sprawdzić czy na Twoim serwerze jest zainstalowane to rozszerzenie, utwórz plik test.php w dowolnym edytorze tekstowym (np Notatnik), wprowadź do niego ciąg znaków:
<?php phpinfo(); ?>
zapisz i umieść go na serwerze. Następnie uruchom swoją przeglądarkę i wywołaj plik. W wyświetlonych informacjach o zainstalowanych rozszerzeniach/bibliotekach odszukaj ciąg "mbstring".
Jeśli go znajdziesz, możesz przejść do instalacji LimeSurvey.
If you don't find the mbstring section you might have a problem on your hands.
Jeśli nie, należy postępować wg jednego z poniższych scenariuszy:
- Jeśli serwer administrowany jest przez providera, zapytaj administratorów o możliwość zainstalowania rozszerzenia
- Jeśli pliki znajdują się na Twoim własnym serwerze opartym o Linux, musisz przekompilować PHP i uwzględnić bibliotekę mbstring. Jeśli nie masz pewności jak to zrobić zapytaj ekspertów lub skorzystaj z następujących podpowiedzi:
- W systemach linux wykorzystujących instalator "yum" (takich jak CentOS, RedHat, Fedora) możesz wykorzystać konsolę i wprowadzić komendę:
- yum install php-mbstring
- Zrestartuj serwer Apache:
- /etc/init.d/httpd restart
- W systemach linux wykorzystujących instalator "yum" (takich jak CentOS, RedHat, Fedora) możesz wykorzystać konsolę i wprowadzić komendę:
- Jeśli używasz serwera opartego o windows musisz odszukać plik php.ini a w nim ciąg "mbstring". Najprawdopodobniej będzie on "wykomentowany". Należy wykasować znaki komentarza, zapisać plik i zrestartować serwer.
Kiedy wprowadzam znaki specjalne (polskie znaki diaktryczne, cyrylica etc.) podczas wypełniania ankiety, wyświetlane są znaki zapytania
Sytuacja taka pojawia się wówczas, gdy utworzona baza danych nie obsługuje znaków w kodowaniu UTF-8. Można to zmienić uruchamiając poniższy kod w systemie administracji bazą danych (np. PhpMyAdmin):
ALTER DATABASE `<nazwa_bazy_danych>` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Zastąp ciąg <nazwa_bazy_danych> nazwą Twojej bazy danych, w której chcesz przechowywać dane 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.