This has nothing to do with the browser. Instead of using
session_register("last_time") and setting $last_time, do this:
$_SESSION['last_time'] = time();
It's shorter and it will make the warning go away.
-Rasmus
On Tue, 23 Mar 2004, James E Hicks III wrote:
> What does the code look like that is causing this error? I know I can turn the
> error off but how do I fix the code that is causing it?
>
> 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
>
> It only seems to appear when viewed using MSIE, Konqueror and Mozilla do not
> display this error, why?
>
> Here is some example code that I am using.
> <?php
> if (!session_is_registered('U_SI')) {
> #do some stuff.
> }
> session_register("last_time");
> $last_time = time();
> echo $_SESSION['last_time'];
> ?>
>
> Here are some settings from php.ini from the server that is giving the error.
>
> /etc/php4/php.ini
>
> register_globals = Off
> [Session]
> session.save_handler = files
> session.save_path = /tmp
> session.use_cookies = 1
> session.name = PHPSESSID
> session.auto_start = 1
> session.cookie_lifetime = 0
> session.cookie_path = /
> session.cookie_domain =
> session.serialize_handler = php
> session.gc_probability = 1
> session.gc_divisor = 100
> session.gc_maxlifetime = 1440
> session.bug_compat_42 = 1
> session.bug_compat_warn = 1
> session.referer_check =
> session.entropy_length = 0
> session.entropy_file =
> session.cache_limiter = nocache
> session.cache_expire = 180
> session.use_trans_sid = 0
> url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
>
>
> PHP 4.3.2 (cli) (built: Aug 12 2003 14:25:22)
> Copyright (c) 1997-2003 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
> with Turck MMCache v2.3.20, Copyright (c) 2002-2003 TurckSoft, St.
> Petersburg, by Dmitry Stogov
>
>
> James Hicks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php