You are not logged in.
Pages: 1
Topic closed
I have a quick question. I realize this error has been asked about before but I have a slightly different question regarding the error.
Installing glpi I've come up with the error:
---------------------
The directory could not be created.
Make sure that PHP has write permissions on the directory:'../var/sessions'. If you're running under a Microsoft Windows environment, make sure the directory is in read-write mode.
---------------------
I know how to fix this using chmod 777 on the config and files dir.
root@locahost:/var/www/glpi/files/_sessions
drwxrwxrwx 2 root root 4096 2008-07-12 05:12 _sessions
/etc/php5/apache2/php.ini
session.save_path = "N;/var/www/glpi/files/_sessions/"
So that is fine, it works. What I want to do is use a different dir for the sessions. Reason being is other apps like mediawiki also require php.ini being pointed at this sessions dir and having to point the php.ini file at glpi/files/_sessions is not ideal.
So instead, would prefer to use something like /var/sessions/ as a central point for storing session info. Now mediawiki has no problem using this but glpi just doesn't seem to like it. Everything is set up in an identical way:
root@locahost:/var/sessions
drwxrwxrwx 2 root root 4096 2008-07-21 12:45 sessions
/etc/php5/apache2/php.ini
session.save_path = "N;/var/sessions/"
and also changed:
/var/www/glpi/config/based_config.php
// Path for sessions storage
if (!defined("GLPI_SESSION_DIR")){
define("GLPI_SESSION_DIR",GLPI_ROOT . "/var/sessions");
To me it all looks identical yet it doesn't seem to work. I'd rather not have to point mediawiki's session information to a session directory inside the glpi install base but am beginning to think I might not have a choice.
Any feedback/help would be greatly appreciated. Thanks.
Last edited by tspec (2008-07-21 08:54:17)
Offline
No information about your configuration (OS, version, ...)
I don't understand what you want to do.
GLPI doesn't use the system session dir but a dedicated one : glpi/files/_sessions.
You shouldn't have any problem
Just keep the default value in both file.
php.ini => /var/lib/php/sessions (or something depending on your OS)
based_config.php => GLPI_ROOT . "files/_sessions"
And if you really need to move sessions for glpi, don't change based_config.php, but create a config/config_path.php, p.e. :
<?php
define("GLPI_SESSION_DIR", "/var/lib/glpi/files/_sessions");
?>
++
P.S. after reading again your post, i see your mistake, if you need a full path remove GLPI_ROOT from your config (and using config_path.php still the better solution)
Last edited by remi (2008-07-21 09:09:04)
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
P.S.2 : also note that GLPI have is own session garbage collector and than session are not named (as glpi designed to use his dedicated directory), so be carefull when sharing session_dir with another app.
++
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
Thank-you for your answer. I'll give it a try.
Normally I wouldn't be sharing sessions with another app but both applications seem to need to point to the following line in php.ini
session.save_path =
I couldn't get past the glpi installation unless I changed that to "N;/var/www/glpi/files/_sessions/" which means Mediawiki would read the php.ini file and store it's session info in that same glpi directory.
Oh, whilst I remember, sorry I didn't mention earlier, I'm using Ubuntu 8.04 Hardy Heron.
Offline
I try to install a glpi on hardy heron , i ve no need to modify sesseion.save_path and i use other application with no prob
JMD / Jean-Mathieu Doléans - Glpi-project.org - Association Indepnet
Apportez votre pierre au projet GLPI : Soutenir
Offline
I try to install a glpi on hardy heron , i ve no need to modify sesseion.save_path and i use other application with no prob
How strange. I changed session.save_path back to default and left glpi as /files/_sessions/ and it's started working again. So it looks like my problems been solved.
I think where I was going wrong is the issue I described above I came across with the previous version of glpi and storing all the session info in a central spot worked then because I couldn't get it working otherwise. But then there was every chance I was doing something wrong there as well as it was my first attempt at installing glpi, so I've attempted to set 0.71 in the same manner because I figured it was going to be the same. I'm actually glad that I can set it up in separate spots. Thanks heaps for all your help.
Offline
Pages: 1
Topic closed