NYCPHP Meetup

NYPHP.org

[nycphp-talk] retro php

Analysis & Solutions danielc at analysisandsolutions.com
Tue Oct 14 10:22:59 EDT 2003


Hi Kenneth:

On Tue, Oct 14, 2003 at 10:08:11AM -0400, Kenneth Dombrowski wrote:
> On 03-10-14 09:30 -0400, Analysis & Solutions wrote:
>
> > The rest of your questions were already answered.
> > 
> 
> were they? I guess shawn wasn't talking about session_register, then?
> another hint, please?  

Oh, I quickly saw someone mention session_register().  I now see that was 
you.

Are you sure session propogation is turned on in your php.ini file?  Is it 
set to use cookies and/or URI rewriting?  If it's set to cookies, is your 
browser accepting and sending the cookie?

Also, http://php.net/session_register says:
vvvvvvvvvv
If you are using $_SESSION  (or $HTTP_SESSION_VARS), do not use 
session_register(), session_is_registered(), and session_unregister().

... snip ...

You can also create a session variable by simply setting the appropriate 
member of the $_SESSION  or $HTTP_SESSION_VARS (PHP < 4.1.0) array.

<?php
// Use of session_register() is deprecated
$barney = "A big purple dinosaur.";
session_register("barney");

// Use of $_SESSION is preferred, as of PHP 4.1.0
$_SESSION["zim"] = "An invader from another planet.";

// The old way was to use $HTTP_SESSION_VARS
$HTTP_SESSION_VARS["spongebob"] = "He's got square pants.";
?>
^^^^^^^^^^
Are you setting your information correctly using ONE of those methods?

--Dan

-- 
     FREE scripts that make web and database programming easier
           http://www.analysisandsolutions.com/software/
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7th Ave #4AJ, Brooklyn NY    v: 718-854-0335   f: 718-854-0409



More information about the talk mailing list