Sessions folder configuration

More
3 years 3 months ago #104498 by eblanche
eblanche created the topic: Sessions folder configuration
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 3 months ago #104575 by Matherion
Matherion replied the topic: Sessions folder configuration
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 3 months ago - 3 years 3 months ago #104577 by eblanche
eblanche replied the topic: Sessions folder configuration
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 3 months ago by eblanche. Reason: typo

Please Log in to join the conversation.

More
3 years 3 months ago #104581 by Matherion
Matherion replied the topic: Sessions folder configuration
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 3 months ago #104585 by eblanche
eblanche replied the topic: Sessions folder configuration
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 3 months ago #104586 by Matherion
Matherion replied the topic: Sessions folder configuration
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 3 months ago #104588 by eblanche
eblanche replied the topic: Sessions folder configuration
yes, just for testings. I'll move it to a more secure place.

Please Log in to join the conversation.

More
3 years 3 months ago #104607 by DenisChenu
DenisChenu replied the topic: Sessions folder configuration
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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 3 months ago - 3 years 3 months ago #104653 by eblanche
eblanche replied the topic: Sessions folder configuration
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 3 months ago by eblanche. Reason: &inf.code&sup. to [code]

Please Log in to join the conversation.

More
3 years 3 months ago - 3 years 3 months ago #104655 by eblanche
eblanche replied the topic: Sessions folder configuration
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 3 months ago by eblanche. Reason: text formatting

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now