Actions

Installation FAQ/fr: Difference between revisions

From LimeSurvey Manual

(Created page with "====index.php ne veut pas s'ouvrir et "php.exe -i" renvoie des messages d'erreurs à propos de dll manquantes====")
(Created page with "Cela peut arriver si vous installer trop d'extensions * si vous installez toutes les extensions PHP, PHP ne fonctionnera pas car toutes les dépendances ne seront pas sa...")
Line 218: Line 218:
====index.php ne veut pas s'ouvrir et "php.exe -i" renvoie des messages d'erreurs à propos de dll manquantes====
====index.php ne veut pas s'ouvrir et "php.exe -i" renvoie des messages d'erreurs à propos de dll manquantes====


This may happen if you install too many extensions
Cela peut arriver si vous installer trop d'extensions
* If you install all PHP extensions, PHP will fail because not all dependencies were met (e.g. oracle package needs oracle dll's)
* si vous installez toutes les extensions PHP, PHP ne fonctionnera pas car toutes les dépendances ne seront pas satisfaites (par exemple, le paquet oracle a besoin des dll oracle)
* Install only the extensions that you need
* installez uniquement les extensions dont vous avez besoin
* To test, try running php.exe -i from the command line
* pour tester, essayez de lancer "php.exe -i" depuis une ligne de commande


===Message stating database was missing===
===Message stating database was missing===

Revision as of 21:37, 11 April 2013

Contenu :

During Installation (Limesurvey 1.92 and below)

Comment créer la base de données et l'utilisateur par la ligne de commande.

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';

Vous devez bien sûr modifier <your_database_name>, <your_database_username> et <your_database_password> dans les commandes précédentes.

Que faire si je ne peux pas créer de base de données grâ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.

Qu'est-ce que la librairie "mbstring" ?

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 :

 <?php phpinfo(); ?>

Ouvrez ce fichier depuis votre navigateur web. Plein d'informations vont s'afficher. Recherchez le texte "mbstring" dans la section Configuration.

Si vous le trouvez, tout va bien et vous pouvez continuer l'installation de LimeSurvey.

Si vous ne trouvez pas la section mbstring, il va falloir régler ça...

Trois scénarios sont possibles :

  • Un serveur fourni/loué : demandez à votre fournisseur d'activer cette extension PHP. Cela ne devrait pas poser de problème.
  • 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 :
    • 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 :
      • 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.

Quand j'utilise des caractères spéciaux (chinois, cyrillique, grec) dans mon questionnaire, chaque caractère est représenté par un point d'interrogation ?

Cela se produit si votre base de données n'a pas été créée pour supporter l'encodage des caractères en UTF-8. Cela peut arriver quand vous créez votre base depuis un outil d'administration. Vous pouvez corriger cela en exécutant cette requête SQL (depuis PHPMyadmin par exemple) :

 ALTER DATABASE `<nom_de_votre_base>` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

en remplaçant <nom_de_votre_base> par le nom de votre base de données.

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 a not existing ressources

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.

During Installation (Limesurvey 2.0 and above)

ADD NEW TOPICS HERE (Thanks!)

After Database Creation

Blank Page after Database Creation

Symptômes :

  • 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.
  • 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"

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".

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)

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 Login

Any action in admin page will return you to login screen

This may happen for the following two main reasons :

  • PHP sessions problems
  • UTF8 encoding problems
  • IE (6,7 and 8) problems

PHP Sessions :

  1. Update upload_tmp_dir and session.save_path in php.ini
  2. Create the configured session and upload directories
  3. IIS: Assigned permission to create and modify to IIS guest user account
  4. Apache: Make sure your webserver has permissions to write into the configured directory
  5. Check if the variable  "session.use_cookies" in php.ini is set to 1.
  6. Check the variable "session.auto_start" in php.ini. If it is set to 1, change it to 0.

UTF8 Encoding :

If you edit any file (most probably config.php) do not save it as UTF8 to support special language chars! Always save .php files as true ANSI/ISO format. Starting with 1.87 you can set the most important settings inside the application using the 'Global settings' dialog (like site name, administrator name, etc.).

IE Cookies :

IE (6,7 and 8) does not support underscore "_" in the server hostname. If it is the case, the cookies are not managed and cookie(s) is(are) not set. So change the server hostname under apache or IIS.

LimeSurvey and suhosin ("Session has expired")

You might, at one point, get a message like :

ERROR

We are sorry but your session has expired.

Either you have been inactive for too long, you have cookies disabled for your browser, or there were problems with your connection.

And if you have Suhosin activated on your server, that's might be the reason why you get this in the middle of a survey.

NB : when your survey is not active, the behaviour might be different, you could be redirected in the middle of a survey to the public list of surveys. The solution is the same.

Suhosin is an advanced protection system for PHP installations. Suhosin default configuration can make trouble to LimeSurvey installation.

First think to test with suhosin log, set suhosin.log.sapi = 511 and suhosin.simulation = on according with suhosin documentation.

The configuration file is usually located in /etc/php5/apache2/conf.d/suhosin.ini but to be sure you can check your phpinfo (Limesurvey administration > Global Settings > Button Show phpinfo > Line : "Additional .ini files parsed") to get the correct path.

Don't forget to restart your Apache server for the parameters to be taken into account (service apache2 restart).

When the simulation is on, Suhosin is not blocking anything and the errors are reported into the logs (usually in your syslog : /var/log/syslog). If you appear to get error messages such as "ALERT-SIMULATION - configured POST variable limit exceeded" that's Suhosin alerting...

This configuration seems to work well with Limesurvey:

suhosin.memory_limit = 128

suhosin.post.max_value_length = 5000000

suhosin.post.max_vars = 5000

suhosin.request.max_value_length = 5000000

suhosin.request.max_vars = 5000

With those parameters, you should be able to put the suhosin.simulation back at the "off" value (so that the serveur is protected and limesurvey still works).

The default values of suhosin are not working well with limesurvey. If you really want to secure your serveur tightly you might want to use the simulation mode to tune the setting and find the good values between 1000 and 5000 for the vars and 1000000 and 5000000 for the value_lenghts.

Note: There was an additional PHP setting introduced recently: max_input_vars - this setting is the same as suhosin.post.max_vars but needs to be set separately in php.ini .

LimeSurvey and suhosin ("quick translate trouble")

You can have some problem with the quick translate module when you are on OpenBSD 5.1 with php-5.3.10.

The symptom is : modification via "Quick translate --> options answer" are not update

You must downgrade your php version to php-5.2.17p8 and use the suhosin tweak proposed above.

I can't change the language!

No matter what language you choose, the interface (admin und user) always is in English language. Normally this is caused by a bug in your PHP version. There is no other fix for this than updating your PHP version.

Quelques erreurs courantes (essentiellement IIS)

index.php ne veut pas s'ouvrir

Cause possible : les extensions nécessaires ne sont pas installées :

  • vous devez installer les extensions Multi-byte string et MSSQL (ou MySQL)

Cause possible : le filtre ISAPI n'est pas configuré

  • dans IIS, vous devez configurer l'utilisation de php5isapi.dll pour l'ensemble de votre site (au moins pour le dossier)

index.php ne veut pas s'ouvrir et "php.exe -i" renvoie des messages d'erreurs à propos de dll manquantes

Cela peut arriver si vous installer trop d'extensions

  • si vous installez toutes les extensions PHP, PHP ne fonctionnera pas car toutes les dépendances ne seront pas satisfaites (par exemple, le paquet oracle a besoin des dll oracle)
  • installez uniquement les extensions dont vous avez besoin
  • pour tester, essayez de lancer "php.exe -i" depuis une ligne de commande

Message stating database was missing

This may happen if you navigate to wrong url

  • Make sure you go to limesurvey/admin/install/index.php instead of limesurvey/index.php !

Above fixes do not solve the problem

This may happen if you have not restarted IIS

  • Restart IIS

Things that were easy to forget:

  • .php needs to be associated to php5isapi.dll filter (It did this for me automagically)
  • limesurvey/tmp directory needs writer permission for survey uploads
  • updating doc_root in php.ini and $rootdir in config.php

Missing files ("No such file or directory")

When uploading LimeSurvey to your server it might happen that the connection is interrupted so that some files are not transferred or not transferred completely. Depending on the files you can receive error message at different part of LimeSurvey usage. Normally missing files throw errors like

"Warning: require_once(/path/to/your/limesurvey/installation/filename) [function.require-once]: failed to open stream: No such file or directory in /path/to/your/limesurvey/installation/filename on line 12345)" OR

"Fatal error: require_once() [function.require]: Failed opening required 'require_once(/path/to/your/limesurvey/installation/filename)' (include_path='.:/x/y/z) in /path/to/your/limesurvey/installation/filename on line 12345"

Solution

1. Delete all uploaded files.

2. Re-upload the files.

(3. If necessary: Re-install by browsing to /limesurveyfolder/admin/install)

Not able to add or edit subquestions/answers after upgrade

If you're not capable of editing or adding a question, ask youre host provider to change the mod_security setting of the domain name. See the forum thread Not Able to Add or Edit Questions on new 1.90 for more info.

Fancy URLs by removing index.php from the URL path

If you want to use fancy URLs and so not have /index.php in every URL please edit /application/config/config.php and change

'showScriptName' => true,

to

'showScriptName' => false,

For this to work properly you must use an Apache webserver with a properly installed mod_rewrite module.