Htaccess file for PHP session time

Hi, I am new to programming, but I'm currently working on a session timeout problem. Basically, my session does not save time, even if I changed session.gc_maxlifetime. I think another script, using the same directory to store session data that does not have the maxlifetime set, works, and instead it will use a shorter value. To combat this, I modified the htaccess file, but it still ends after 1 hour 30 minutes, I need it to last longer. My htaccess file is below. I looked through and tried many of the relevant posts on this board, but so far nothing has worked. Any ideas would be greatly appreciated.

SetEnv PHPRC /home/rocket/public_html/php.ini

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

<IfModule mod_php5.c>
php_value session.save_path "new/username/php_sessions"
php_value session.gc_maxlifetime "86400"
php_value session.cookie_lifetime "86400"

</IfModule>


# END WordPress
+3
source share
1

PHP , , ...

php_value session.gc_maxlifetime "86400"

, - , , .

php_value session.cookie_lifetime "86400"

, cookie ... , session_start(), , , . reset "", cookie_lifetime 600 10 10 - .

php_value session.cookie_lifetime "0", , cookie , .

, , PHP-, , - $_SESSION['expires'] //, .

+3

All Articles