RE: [PHP] Starting sessions, registering variables, destroying sessions with global_variables off....
| From: | Rich Gray | Date: | Fri, 24 Jan 2003 13:47:22 +0000 |
| Subject: | RE: [PHP] Starting sessions, registering variables, destroying sessions with global_variables off.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132990@lists.php.net to get a copy of this message | ||
Phil
It should be as easy as ..
<?
session_start();
$_SESSION['foo'] = 'bar';
?>
You'll need a session_start() on all pages that will be using the
$_SESSION[] array.
Is your session.save_path pointing to a writable directory? Do you see any
errors in the server logs when you try to start a session?
Rich
-----Original Message-----
From: Phil Schwarzmann [mailto:phil@filanya.com]
Sent: 24 January 2003 13:36
To: php-general@lists.php.net
Subject: [PHP] Starting sessions, registering variables, destroying
sessions with global_variables off....
I just switched from a 4.06 server with global_variables ON to a 4.22
with global_variables OFF....
Can someone give me a quick run down of how to set/unset variables and
register/destroy sessions with PHP 4.22 (global_variables OFF).
I've been all through the php.net manual and still can't figure it out.
I know that I have to use $_SESSION['foo'] instead of just $foo now, but
for some reason I can't get session_start(); to properly start a
session.
Any ideas??
Thanks!!