RE: [PHP-WIN] session problem

From: Date: Fri, 07 Dec 2001 18:09:35 +0000
Subject: RE: [PHP-WIN] session problem
Groups: php.windows 
Request: Send a blank email to php-windows+get-10795@lists.php.net to get a copy of this message
Hello Afan, I'm also using Sessions, but I learned that when using session_register you don't use the normal variable syntax with the session variable, such as ($name). Here's my code that works properly: <? //register the user's ID and permission level session_register('SESSION_UID'); session_register('SESSION_UPERMS'); $SESSION_UID = $uid; $SESSION_UPERMS = $uperms; ?> As you can see I use session_register('variablename'), then declare the session variables after registering them (at first they have nothing in them, or 0, I believe. By the way, $uid and $uperms are values I retrieved from the database. You can hardcode values in there accordingly. So your code would be: <php session_start(); session_register('name'); $name="afan"; ?> And that should work. Hope this helps... David -----Original Message----- From: Afan Pasalic [mailto:afan@sprout.net] Sent: Friday, December 07, 2001 1:11 PM To: php-windows@lists.php.net Subject: [PHP-WIN] session problem Hi, I'm playing with session and after <php session_start(); session_register($name); $name="afan"; ?> I'm getting this warning: Warning: open(/tmp\sess_41d3918086b66b0e71cc6a0dc5dea344, O_RDWR) failed: m (2) in C:\admin\index.php on line 2 What's problem? Thanks for any help. Afan

« previous php.windows (#10795) next »