Actions

Installation FAQ/fr: Difference between revisions

From LimeSurvey Manual

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


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


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


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


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


=Starting installation=
=Starting installation=


===Comment créer la base de données et l'utilisateur par la ligne de commande.===
==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.
You have to enter the below commands in your MySQL:


<syntaxhighlight lang="sql" enclose="div">create database <your_database_name>;
*<code>create database '''<your_database_name>''';</code>


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


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


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


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


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


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


Vous devez bien s&ucirc;r modifier <your_database_name>, <your_database_username> et <your_database_password> dans les commandes précédentes.
In terminal, <code>'''<your_database_name>'''</code>, <code>'''<your_database_username>'''</code>, and <code>'''<your_database_password>'''</code> have to be replaced with the according/desired values.


===Que faire si je ne peux pas créer de base de données gr&acirc;ce à un script ?===
===Que faire si je ne peux pas créer de base de données gr&acirc;ce à un script ?===


En temps normal, un script de LimeSurvey crée une nouvelle base de données avec les tables nécessaires. Cependant, si vous n'avez pas les droits suffisants pour créer une base de données MySQL sur le serveur ou celui de votre FAI, il faudra contacter son administrateur afin qu'il crée cette nouvelle base à votre place en vous donnant les droits requis dessus (càd Lecture / Écriture / Création). Renseignez ensuite le nom de cette base, votre nom d'utilisateur et votre mot de passe dans le fichier config.php puis exécutez le script /admin/install/index.php script. Celui-ci ajoutera toutes les tables nécessaires dans la base.
Normally, the script creates a new database, and then the table structure. However, if your server/ISP doesn't give you admin rights to create a new database in MySQL, you will need to contact your server administrator to get the necessary database created (or create it yourself if you receive the required permissions). The newly created blank database should include the appropriate access rights (i.e.: read/write/create). Then, you should be able start the LimeSurvey installation, which will create the tables within the newly created database.


==Blank page when accessing the Install page==
==Blank page when accessing the Install page==
Line 46: Line 45:
*Verify you have the MySQL PHP module (php-mysql) installed.
*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 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
*Verify the location and permissions of the following setting in your PHP.ini:


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


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


==Error messages because of non-existing resources==
==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.
Sometimes, files are not uploaded correctly or were broken during the upload process. This leads to several different error messages. Most of them refer to a file or function within a file which can't be found.


'''Solution:''' Re-upload all files using the binary mode of your FTP program.
'''Solution:''' Re-upload all files using the binary mode of your FTP program.
Line 61: Line 60:
=Requirements page=
=Requirements page=


===Qu'est-ce que la librairie "mbstring" ?===
==What is the mbstring (Multibyte String Functions) library?==


Il s'agit d'une librairie PHP qui permet de convertir les caractères d'une langue à l'autre. Vous en aurez besoin si vous voulez utiliser LimeSurvey. Pour vérifier si elle est installée sur votre système, créez un fichier test.php qui contiendra ceci :
The mbstring library is a PHP library that can convert char sets from one language to another. You need it if you want to run LimeSurvey. To check if it is already installed, open the URL from an web browser:  


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


Ouvrez ce fichier depuis votre navigateur web. Plein d'informations vont s'afficher. Recherchez le texte "mbstring" dans la section '''Configuration'''.
A lot of information will be shown. Search for the string 'mbstring' under the '''Configuration''' section. If you find the mbstring section then all should be well and you can continue on with your LimeSurvey installation!


Si vous le trouvez, tout va bien et vous pouvez continuer l'installation de LimeSurvey.
'''If you don't find the mbstring section''', you might have a problem on your hands. There are three possible scenarios:
 
*If it's your host provider's server, ask for the activation of that extension in PHP or further information on how you can activate it - if you have a good administration panel for your server, you may be able to activate it yourself;
'''Si vous ne trouvez pas la section mbstring''', il va falloir régler ça...
*If it's your own '''Linux''' server, you may have to re-compile PHP and include the mbstring library. Ask the Linux experts how to do that. However, you can install it using your Linux package manager, which is mostly available in all Linux distributions nowadays;
 
**If you are using a version of Linux that supports 'yum' (CentOS, RedHat, Fedora):
Trois scénarios sont possibles :
***Use the terminal (as a super user) and type: '''yum install php-mbstring''';
*Un serveur fourni/loué : demandez à votre fournisseur d'activer cette extension PHP. Cela ne devrait pas poser de problème.
***Make sure to update /etc/php.ini and uncomment the various mbstring params;
*Votre serveur sous Linux : il faudra recompiler votre PHP en incluant la librairie "mbstring". De nombreux tutoriels sont disponibles sur internet. Google est votre ami. Sinon, demandez aux experts Linux :
***Make sure to restart apache after installing it: '''/etc/init.d/httpd restart''';
** si vous utilisez une distribution qui supporte "yum" (CentOS, RedHat, Fedora), vous pouvez régler cela facilement via un terminal en tant que root et en tapant :
*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.
***'''yum install php-mbstring'''
**Assurez-vous de mettre à jour le fichier /etc/php.ini en enlevant les commentaires devant les différentes lignes de paramètres de mbstring
**Pensez à redémarrez les serveur Apache après cette installation :
***'''/etc/init.d/httpd restart'''
*Votre serveur sous Windows : le cas le plus simple normalement. Recherchez et éditez le fichier php.ini. Recherchez le texte "mbstring". La plupart du temps, la ligne qui contient ce texte est commentée par un point-virgule au début. Effacez ce point-virgule, sauvegardez le fichier php.ini et redémarrez votre serveur web.


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


=After database creation=
=After database creation=
Line 91: Line 84:
==Blank page after database creation==
==Blank page after database creation==


====Symptômes :====
===Symptoms===
* LimeSurvey est correctement installé, la base de données a été créée mais à la place de l'écran d'administration, vous obtenez une page vide.
* LimeSurvey installed OK, and database was created, but instead of the admin page, you get an empty page
* Vous pouvez lire ceci dans les logs du serveur web     * "Fatal error: Call to a member function on a non-object in /path/to/limesurvey/admin/login_check.php on line 69"
* Web server log shows "Fatal error: Call to a member function on a non-object in /path/to/limesurvey/admin/login_check.php on line 69"


====Remède====
====Remède====


C'est probablement à cause d'un mauvais réglage pour $rooturl ou $rootdir dans config.php. En effet, config.php essaie de déterminer correctement la valeur de $rootdir en appelant 'dirname('''FILE''')' et si cela fonctionne dans la plupart des cas, cela peut ne pas être le cas quand LimeSurvey est installé dans un répertoire d'utilisateur ou un dossier public_html et que le dossier de l'utilisateur est monté par NFS. Essayez de définir $rootdir manuellement et en particulier, si votre shell ou si la commande pwd vous retourne un chemin du genre "/disks/hostname/home/username/public_html/limewire", essayez d'utiliser "/home/username/public_html/limewire".
This is probably related to an incorrect setting for <code>$rooturl</code> or <code>$rootdir</code> in config.php. The file config.php attempts to set <code>$rootdir</code> correctly by calling <code><nowiki>dirname('''FILE''')</nowiki></code>. While this usually works, it can be upset when LimeSurvey is installed in a user's home or public_html directory and the home directory is mounted over NFS. To set up manually the <code>$rootdir</code>, (your shell or pwd command may show you a path like "/disks/hostname/home/username/public_html/limesurvey"), try using "/home/username/public_html/limesurvey".
 
ce problème peut aussi survenir par un paramétrage incorrect de $rooturl ou par l'oubli de l'activation de mbstrings.


===Quelques erreurs courantes (essentiellement IIS)===
==When accessing the admin page, the browser keeps running and will eventually fail to show it==


===Symptoms===
===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.
* LimeSurvey installed OK and the database was created. But when you access the admin page, the browser keeps running and will eventually fail to show the page.
* When you check the web server access log, its size has become so big (in some cases, more than 2 GB).
* When you check the web server access log, its size has become quite big (in some cases, more than 2 GB).
* Inside the access log, you get this message filling the log.
* Inside the access log, you get this message filling the log:


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


''Note:'' line number may be different depending on your LimeSurvey version.
{{Note|The line number may be different depending on your LimeSurvey version.}}


===Fix===
===Fix===
Line 118: Line 109:
mbstring.func_overload = 0
mbstring.func_overload = 0


''Note:'' This means no function overloading. See PHP manual for this setting: [http://us3.php.net/manual/en/mbstring.overload.php Function Overloading Feature]
{{Note|This means no function overloading. See the PHP manual for this setting: [http://us3.php.net/manual/en/mbstring.overload.php Function Overloading Feature].}}


==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==
==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===
===Symptoms===
* LimeSurvey installed OK and database was created. But when rdirected to the admin page, the browser displayed the the listed error.
* LimeSurvey installed OK and database was created. But when redirected to the admin page, the browser displayed the the listed error.
* $rootdir and $rooturl are correctly set in config.php.
* <code>$rootdir</code> and <code>$rooturl</code> are correctly set in config.php.
* The disk path name for limesurvey installation directory includes one of the following characters: ()+
* The disk path name for limesurvey installation directory includes one of the following characters: '''(''',''')''' or '''+'''.


''Note:'' Other characters may also induce the same behaviour
{{Note|Other characters may also induce the same behaviour.}}


===Fix===
===Fix===


Move / rename the limesurvey installation directory so that pathname does not include either the '''(''' or ''')''' characters
Move/rename the limesurvey installation directory so that the path name includes non of the following characters: '''(''', ''')''' or '''+''' characters.


=After installation=  
=After installation=  


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

Revision as of 15:10, 7 August 2017

Contenu :

Installation on your computer

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

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

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


Starting installation

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

You have to enter the below commands in your MySQL:

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

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

Que faire si je ne peux pas créer de base de données grâce à un script ?

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

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 if your server runs a suitable PHP version.

Error messages because of non-existing resources

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

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

Requirements page

What is the mbstring (Multibyte String Functions) library?

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

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

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

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

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

Stuck at checking file system permissions

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

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 server log shows "Fatal error: Call to a member function on a non-object in /path/to/limesurvey/admin/login_check.php on line 69"

Remède

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

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

Symptoms

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

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

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

This means no function overloading. See the 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 redirected to the admin page, the browser displayed the the listed error.
  • $rootdir and $rooturl are correctly set in config.php.
  • The disk path name for limesurvey installation directory includes one of the following characters: (,) or +.
Other characters may also induce the same behaviour.

Fix

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

After installation

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