Sessions folder configuration

More
3 years 1 month ago #104498 by eblanche
Hi,
Is there a setting somewhere to force the session folder ?
I see that there is a call to session_save_path($value) in framework/yiilite.php
Where does the value comes from and how can I set it ?

Thanks
Eric

Please Log in to join the conversation.

More
3 years 1 month ago #104575 by Matherion
Heh, I know this :-)

You can set it in php.ini :-)

The location of this file can be checked with phpinfo() - you can create e.g. a page 'phpinfo.php' with the following content and put it somewhere on your server:
<?php
  phpinfo();
?>
When you then call that file with your browser, at the top you can see which php.ini is loaded. Does this help?

Please Log in to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #104577 by eblanche
Hi Matherion,
yep, I know it is stored in the php.ini file but I am on a shared server (no access as admin) and the php.ini can not be set per virtual host.
I use the php session_save_path function in other sites hosted on the same machine, I was just wondering where to set it in Limesurvey out of manually editing the file.
Last Edit: 3 years 1 month ago by eblanche. Reason: typo

Please Log in to join the conversation.

More
3 years 1 month ago #104581 by Matherion
Ah, ok. So then I can't help I'm afraid :-) I haven't seen this option anywhere in LimeSurvey as a regular setting . . . You could maybe use .htaccess to store the different path?

Please Log in to join the conversation.

More
3 years 1 month ago #104585 by eblanche
Hey, you help :cheer: !
I did not think of the .htaccess file.
I'll try
php_value session.save_path .sessions
in the .htaccess of my application and let you know.

I would prefer a LimeSurvey option, but if I can use this workaround, it's fine.

Please Log in to join the conversation.

More
3 years 1 month ago #104586 by Matherion
Ok, let's hope that helps . . . So, um, just to be sure - you called the dir '.sessions', and it's in the same dir as the .htaccess file?

Please Log in to join the conversation.

More
3 years 1 month ago #104588 by eblanche
yes, just for testings. I'll move it to a more secure place.

Please Log in to join the conversation.

More
3 years 1 month ago #104607 by DenisChenu
We leave session save path to web admin. Can be set in virtual host etc ...

In Debian /tmp/ is great too.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #104653 by eblanche
I don't know how to set a php setting for an individual vhost.
I have read access to my vhost configuration,
AllowOverride none
is mentioned in the apache vhost .conf file, no way to change anything from the .htaccess file.
The only solution to change the location is to use the session_save_path function from .php

It may be a nice to have setting for limesurvey as the call to that function already exists in the code (framework/yiilite.php)
For the time being, I'll manually add this line somewhere in the code.
Last Edit: 3 years 1 month ago by eblanche. Reason: &inf.code&sup. to [code]

Please Log in to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #104655 by eblanche
I created tmp/sessions folder and added the following lines in application/config/config.php under the 'component' key:
'session' => array (
     dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'sessions'
),

I guess the upgrade process is keeping the configuration file, so the parameter would not be erased.

Issue solved B)
Last Edit: 3 years 1 month ago by eblanche. Reason: text formatting

Please Log in to join the conversation.