Jump to content

Restoring Sessions


supertrucker

Recommended Posts

I know this is possible, and it's been over a year since I have done anything with PHP, so I'm really, really rusty. I did it before, but I can't remember how I did it! I have a user log in screen, where they can put in their user id and password. How do I:1: Setup PHP so that cookies are mandatory for login to function.2: Restore a session so that they don't have to put in there password everytime they login (set it for like a week or so before it destroys itself).Thanks for any help that anyone can give me, you're a lifesaver! :)

Link to comment
Share on other sites

Look in the php.ini file and find:"session.use_only_cookies boolean session.use_only_cookies specifies whether the module will only use cookies to store the session id on the client side. Enabling this setting prevents attacks involved passing session ids in URLs. This setting was added in PHP 4.3.0. Defaults to 1 (enabled) since PHP 6.0."and"session.cookie_lifetime integersession.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser. The value 0 means "until the browser is closed." Defaults to 0. See also session_get_cookie_params() and session_set_cookie_params().Note: The expiration timestamp is set relative to the server time, which is not necessarily the same as the time in the client's browser.""session.cache_expire integer session.cache_expire specifies time-to-live for cached session pages in minutes, this has no effect for nocache limiter. Defaults to 180. See also session_cache_expire()."http://us.php.net/manual/en/ref.session.php

Link to comment
Share on other sites

Ok, here's the problem. I use a hosted server, and don't have access to the php.ini file. Is there a way to set these settings on the fly?Thanks,Andy

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...