Re: session_save_path
| From: | Jordi Canals | Date: | Fri, 08 Oct 2004 00:20:16 +0000 |
| Subject: | Re: session_save_path | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198912@lists.php.net to get a copy of this message | ||
You have to set the session_save_path("some_where") in all pages where
you call to session_start(). And you should do it *before* calling
session_start.
On the manual:
session_save_path() returns the path of the current directory used to
save session data. If path is specified, the path to which data is
saved will be changed. session_save_path() needs to be called before
session_start() for that purpose.
On Thu, 07 Oct 2004 14:26:39 -0400, Al Rider <alan@ridersite.org> wrote:
>
> Tried adding to a common functions file used by several pages:
> session_save_path /www/u/user/htdoc/session2; and
> session_save_path $_SERVER['DOCUMENT_ROOT'] . "/SESSION2";
>
> Doesn't work, uses the path in php.ini.
>
> I'm guessing that session_save_path has to be declared on every page using
> session stuff and not just on their common function page. That's a pain, if
> so.