Re: newbie needs help with session variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/19/2008 2:20 PM, "Rod Clay" <rclay@xxxxxxxxxxxxxxx> wrote:

> Hi.  I'm still very new to php and still trying to learn the ropes.


...Blind leading the blind (I'm a newbie also but...)

Did you try...?

session_id()) 
session_start();

- - - - -
From: PHP: session_id - Manual
Location: http://us2.php.net/manual/en/function.session-id.php
- - - - -

session_id() is used to get or set the session id for the current session.

The constant SID can also be used to retrieve the current name and session
id as a string suitable for adding to URLs. See also Session handling.




- - - - -
From: PHP: session_start - Manual
Location: http://us2.php.net/manual/en/function.session-start.php
- - - - -

Description

bool session_start ( void )
session_start() creates a session or resumes the current one based on the
current session id that's being passed via a request, such as GET, POST, or
a cookie.

If you want to use a named session, you must call session_name() before
calling session_start().

session_start() will register internal output handler for URL rewriting when
trans-sid is enabled. If a user uses ob_gzhandler or like with ob_start(),
the order of output handler is important for proper output. For example,
user must register ob_gzhandler before session start.




> 
> I'm working on some code now trying to set up a session and use session
> variables in different scripts, but I'm getting this message:
> 
> *Warning*: Unknown: Your script possibly relies on a session side-effect
> which existed until PHP 4.2.3. Please be advised that the session
> extension does not consider global variables as a source of data, unless
> register_globals is enabled. You can disable this functionality and this
> warning by setting session.bug_compat_42 or session.bug_compat_warn to
> off, respectively. in *Unknown* on line *0
> 
> *2 questions:
> 
> 1) I've turned on register_globals in all of my php.ini files and
> restarted the webserver, but I'm still getting this message.  Can anyone
> help me with this?
> 
> 2) I get the idea that one should NOT turn on register_globals, but, if
> I don't do this, how do I share session variables between scripts (and
> avoid this message)?
> 
> Thanks for any help that anyone can provide.
> 
> Rod Clay
> clay.1@xxxxxxx*
> *


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux