I've read a few of the other threads, but they don't make sense to me. I don't know much about sessions, so any help in the simplest terms would be greatly appreciated. Thanks in advance.

Comments

videojunky’s picture

I havent looked too much into it, but it would be better if i could include a remmeber me checkbox next to logins or something similar. Personally i hate having to log in everytime i close the page with my site up and logged in.

jdmquin’s picture

Drupal uses php sessions. 4.5 puts the session settings in the .htaccess file which does not work on all web servers depending on the server's configuration. I use 1and1.com as my hosting company and they do no support php settings in the .htaccess file. If your host does not support this you can duplicate the configuration in version 4.6. Copy the following code into your includes/conf.php file or sitename.php if you have multiple site configuration setup.

/**
 * PHP settings:
 *
 * To see what PHP settings are possible, including whether they can
 * be set at runtime (ie., when ini_set() occurs), read the PHP
 * documentation at http://www.php.net/manual/en/ini.php#ini.list
 * and take a look at the .htaccess file to see which non-runtime
 * settings are used there. Settings defined here should not be
 * duplicated there so as to avoid conflict issues.
 */
ini_set('arg_separator.output',     '&');
ini_set('magic_quotes_runtime',     0);
ini_set('magic_quotes_sybase',      0);
ini_set('session.cache_expire',     200000);
ini_set('session.cache_limiter',    'none');
ini_set('session.cookie_lifetime',  2000000);
ini_set('session.gc_maxlifetime',   200000);
ini_set('session.save_handler',     'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid',    0);

Make sure you remove these php settings in your .htaccess file (this is a hidden file in your drupal root directory.)

Another more difficult way to do this is to put a php.ini file in each subdirectory of your drupal site that has files ending in php. You can put the file in your drupal root, then create a link to each of the subdirectories. But this is messy.

videojunky’s picture

would this lag the server up if i say had a few hundred users coming and going frequently on a 1gig (slow ram), 2.4gighertz server?
and also would there be any other similar side effects?