To know which php.ini file is really used and with realtime values (some settings can be modified via code), then use the phpinfo(); function.
Like this: Create a new file in GLPI folder called it phpinfo.php and edit it to insert the following code <?php phpinfo(); then call this URL like: http://my.server.com/phpinfo.php then you should be able to find which ini file is used. è For security reasons don’t let this file on your server regards, Olivier MORON Miscellaneous Program Member RAYNET SNC Tel : +33 4 76 33 49 52 Fax: +33 4 76 70 56 63 -----Original Message----- From: Josep Guerrero Sole [mailto:[email protected]] Sent: Tuesday, June 02, 2015 11:18 AM To: [email protected]; Moron, Olivier Subject: Re: [Glpi-user] Cannot add components to any computer Hi Olivier, > Another test that can be done is in ‘inc/html.class.php’ and to comment > like following: > > static function displayRightError() { > self::displayErrorAndDie(__("You don't have permission to perform > this action.")); } > > static function displayRightError() { > // self::displayErrorAndDie(__("You don't have permission to perform > this action.")); } This has worked! I commented that line, and this time the component was added with no error message! > DON’T FORGET TO UNCOMMENT THESE LINES AFTER TEST ☺! Could that missing line cause me a problem? I mean, since it looks like I cannot add components with that line anyway, and that makes glpi, if not unusable, at least severely limited, I'm feeling tempted to leave it commented. I've even logged out and logged in again and the newly added component was still there, so it looks it really has been added to the database (not just displayed on screen). > Edit: 'front/item_device_common.form.php' >... > f (!$item_device->canView()) { > // Gestion timeout session > Session::redirectIfNotLoggedIn(); > Html::displayRightError(); > } It looks like I don't have this file (maybe it was added in a post 0.84.8 version?). I've even recursively grepped the whole /usr/share/glpi directory searching for the strings "redirectIfNotLoggedIn" or "item_device->canView" with no results, so I haven't been able to try this suggestion. > (check your > php.ini file) There are two php.ini files, one in /etc/php5/cli/php.ini and another in /etc/php5/apache2/php.ini. I assume the correct one would be the second, the one in the apache2 directory. I've looked for options related to the concepts of session and time, and I only have found these two: session.cookie_lifetime = 0 ; http://php.net/session.gc-maxlifetime session.gc_maxlifetime = 1440 ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): I don't know about the first one (the one about cookie lifetime), but I'm fairly sure that it never took me more than a few minutes (less than ten) from logging in with a user to trying to add a component, so I wouldn't expect the second option to have had an impact on this error. Thanks once more for your help! It's really very appreciated Regards, Josep Guerrero
_______________________________________________ Glpi-user mailing list [email protected] https://mail.gna.org/listinfo/glpi-user
