Re: Session Variables

From: Date: Wed, 31 Dec 2014 08:10:08 +0000
Subject: Re: Session Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-324195@lists.php.net to get a copy of this message
On Wed, Dec 31, 2014 at 12:43:07AM -0500, Ethan Rosenberg wrote:
I have the following code in two files, before any HTML code - <?php session_name("STORE"); session_start(); session_set_cookie_params( 'lifetime', '/var/www' ); session_id('Gingy'); set_time_limit(2400); ?> The first file starts and runs. The second file, called from a form, cannot find localhost, and goes into an infinite loop. Apache dies when the loop starts. Hello Ethan,
I don't think that any of the above has anything to do with the looping you are talking about and deffinately nothing to do with not being able to "find localhost". Also, I would suggest to call session_id before calling session_start - as described in manual, otherwise, it will have not effect. Second parameter for session_set_cookie_params is a path of your path in http request, it is not a filesystem path and as with session_id, call it before session_start - read the manual. Regards, A.

« previous php.general (#324195) next »