You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2016-11-08 14:31:13

unhappytroll
Member
Registered: 2016-11-08
Posts: 3

Access denied. None or Invalid path in HTTP_REFERER.

I've been trying to setup GLPI (current stable 0.91) under current UniServer Zero XIII 13.2.1(PHP 7.0.12) default configuration. And had this error after submitting data to database connection setup page (Step 1).
Variable value at this point is:

$_SERVER['HTTP_REFERER']    http://localhost/us_extra/phpinfo.php

which is standard for UniServer installation.

What can I do to avoid this error?

UPD. Editing of virtual hosts did not helped.

define("DO_NOT_CHECK_HTTP_REFERER", "1");

did not helped.
UPD2:
Ok, looks like problem is in toolbox::checkValidReferer():

     if(!isset($url['path'])
          || (!empty($CFG_GLPI['root_doc'])
            && (strpos($url['path'], $CFG_GLPI['root_doc']) !== 0))) {
         if ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) {
            Html::displayErrorAndDie(__("None or Invalid path in HTTP_REFERER. Reload previous page before doing action again."),
                                  true);
            $isvalidReferer = false;
         }
      }

I am not very skilled in php, so I do have trouble to understand what it really wanted from me. Does it want to path to www directory to be in PATH environment variable?
It did not check defined variable "DO_NOT_CHECK_HTTP_REFERER" and I do not understand why it want to have referer in the first place, because PHP manual tells us this:

'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

And there is a second bug, probably related. After saving any change in any form (f.e. user profile or ticket) no information is displayed until user is logout and login again. Even administrator.

Last edited by unhappytroll (2016-11-08 16:25:38)

Offline

#2 2016-11-08 20:58:33

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Access denied. None or Invalid path in HTTP_REFERER.

Have you define web adress of the apllication in Setup > General?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2016-11-09 13:48:47

unhappytroll
Member
Registered: 2016-11-08
Posts: 3

Re: Access denied. None or Invalid path in HTTP_REFERER.

URL of the application http://localhost

yes, I had

as for first error, I had to comment this part of function to complete installation.

Last edited by unhappytroll (2016-11-09 13:52:23)

Offline

#4 2016-11-14 09:39:10

unhappytroll
Member
Registered: 2016-11-08
Posts: 3

Re: Access denied. None or Invalid path in HTTP_REFERER.

Ok, case is partially closed, 'cause it works normally under XAMPP. Still I wonder, what is the difference...

Offline

Board footer

Powered by FluxBB