You are not logged in.
Pages: 1
Bonjour,
J'utilise Nginx comme serveur pour GLPI.
J'ai suivi la config donnée dans la documentation de l'API qui est la voici :
server {
listen 80 default_server;
listen [::]:80 default_server;
# change here to match your GLPi directory
root /var/www/html/glpi/;
index index.html index.htm index.nginx-debian.html index.php;
server_name localhost;
location / {
try_files $uri $uri/ =404;
autoindex on;
}
location /api {
rewrite ^/api/(.*)$ /apirest.php/$1 last;
}
location ~ [^/]\.php(/|$) {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;
# Bypass the fact that try_files resets $fastcgi_path_info
# # see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
# allow directory index
fastcgi_index index.php;
}
}
Donc j'ai bien accès à l'API et j'arrive bien à faire tout ce qui est possible de faire.
Mais j'ai un gros problème dans les dropdown lorsque je crée un ticket par exemple, il me fait "failed loding".
Cette erreur vient de ce bloque là :
# Bypass the fact that try_files resets $fastcgi_path_info
# # see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
Car en commentant ce dernier bloque, le dropdown fonctionne bien, mais je n'ai plus accès à l'API....
Voici les logs nginx :
#0 {main}
thrown in /var/www/html/glpi/ajax/ticketassigninformation.php on line 46" while reading response header from upstream, client: XX.XX.XX.XX, server: localhost, request: "POST /ajax/ticketassigninformation.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "XX.XX.XX.XX", referrer: "http://XX.XX.XX.XX/front/ticket.form.php"
Et les logs glpi :
*** PHP Notice(8): Undefined index: glpidropdown_chars_limit
Backtrace :
inc/dropdown.class.php:118
inc/commondbtm.class.php:3316 Dropdown::show()
inc/ticket.class.php:4354 CommonDBTM::dropdown()
inc/commonglpi.class.php:467 Ticket->showForm()
ajax/common.tabs.php:97 CommonGLPI::displayStandardTab()
Merci pour votre aide
Last edited by afourti_01 (2017-01-11 15:29:51)
Offline
Personne ne saura m'aider sur ce point svp?
Offline
GLPI fonctionnait avant que tu ajoutes le bloc de l'API ?
- SoluTek.fr - | occasional plugin contributor
GLPI 9.3.1
Windows 2016 - IIS Reverse Proxy - HTTPS/Let's Encrypt | Apache 2.4.33 / PHP 7.1.16
Offline
Bonjour,
Oui sans le.bloc, flou fonctionne parfaitement bien
Offline
Personne svp ?
Offline
tu as regarder ce lien ?
Virtual Box \ Ubuntu 20.4 \ GLPI 9.5.3
Offline
oui j'ai deja vu cette page, ça correspond à ce que j'ai dans mon setup nginx
Offline
perso je n'utilise pas nginx ! (donc je ne pourrais pas beaucoup faire qqu pour toi désolé
un autre lien en intern sur le forum
http://forum.glpi-project.org/viewtopic.php?id=149979
un autre :
http://portfolioremyvang.zz.mu/wp-conte … deGLPI.pdf
Virtual Box \ Ubuntu 20.4 \ GLPI 9.5.3
Offline
Bonjour, je suis sur une installation debian 9.8 (nginx php7) et glpi 9.4.1.1 et je retrouve le même soucis. Avez vous résolu ?
Offline
j'ai trouvé c'est dans /etc/php/7.0/fpm/php.ini
il faut commenté cgi.fix_pathinfo=0
ligne 760
Résolu pour moi.
Offline
Pages: 1