Welcome, Guest
Username: Password: Remember me

TOPIC: Sessions folder configuration

Sessions folder configuration 2 months 1 week ago #104498

  • eblanche
  • eblanche's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
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
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104575

  • Matherion
  • Matherion's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
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?
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104577

  • eblanche
  • eblanche's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
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: 2 months 1 week ago by eblanche. Reason: typo
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104581

  • Matherion
  • Matherion's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
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?
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104585

  • eblanche
  • eblanche's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
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.
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104586

  • Matherion
  • Matherion's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
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?
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104588

  • eblanche
  • eblanche's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
yes, just for testings. I'll move it to a more secure place.
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104607

  • DenisChenu
  • DenisChenu's Avatar
  • NOW ONLINE
  • Moderator Lime
  • Posts: 5837
  • Thank you received: 712
  • Karma: 221
We leave session save path to web admin. Can be set in virtual host etc ...

In Debian /tmp/ is great too.
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104653

  • eblanche
  • eblanche's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
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: 2 months 1 week ago by eblanche. Reason: &inf.code&sup. to [code]
The administrator has disabled public write access.

Sessions folder configuration 2 months 1 week ago #104655

  • eblanche
  • eblanche's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Karma: 0
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: 2 months 1 week ago by eblanche. Reason: text formatting
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.328 seconds
Donation Image