Interesting.  I just tried turning register_globals on, and the behavior
got even more loopy.

FWIW, with SM-1.2.11 on PHP 4.0.5, everything works perfectly with
register_globals on or off.

--
  Troy Settle
  Pulaski Networks
  http://www.psknet.com
  540.994.4254 ~ 866.477.5638
  Pulaski Chamber 2002 Small Business Of The Year


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Don Sutherland
> Sent: Tuesday, March 18, 2003 4:26 PM
> To: Jonathan Angliss
> Cc: [EMAIL PROTECTED]; 
> [EMAIL PROTECTED]
> Subject: [SM-USERS] Re: [SM-STABLE] PHP 4.3, and SquirrelMail 
> 1.2 branch... test code
> 
> 
> As I am running php 4.3.1 with Apache 1.3.27 and don't think that
> the Apache 1 vs Apache 2 should make any difference in whether
> prefs show up automatically or not i did some looking at the 
> session handling code and notes on the php web site.
> 
> Seeing some notes about not using session_register() with
> register_globals disabled, i tried changing my register_globals
> setting on an unpatched/unaltered copy of SM.  
> 
> First i left things alone (register globals was off) and it was indeed
> not showing the pref changes right away.  
> 
> Next i turned register_globals on, and then any changes made were
> showing up right way.   Turning it back off reverted to them 
> not showing 
> up.
> 
> My guess is that the combination of register_globals and 
> session_register
> is causing some odd things to happen with how the global variable
> and the $_SESSION variable interact.  Probably with register set to on
> they are references to the same data structure, while with them off
> its a copy of the array.
> 
> I also just tried the following.  IN prefs.php i added &'s to the 
> declarations of $prefs_cach and $prefs_are_cached to make 
> them references.
> And this too, started letting the preferences work correctly. 
>  This doesn't
> surprise me as then any changes to the cache are reflected in 
> $_SESSION.
> 
> However i really thought i had tried that before and it 
> didn't work then,
> so either now or then i was out of my mind..
> 
> here are the lines i changed
> 
> line 17:
>     $prefs_cache = & $_SESSION['prefs_cache']; 
> 
> line 20:
>     $prefs_are_cached = & $_SESSION['prefs_are_cached']; 
> 
> All in all my guess is that this is directly related to the 
> php session 
> configuration along with the value of register_globals..  
> 
> Though my mind is a bit flaked out as to some of the details now :)
> 
> Info as to the value of register globals on other peoples 
> configurations
> and whether prefs are ok or not by default might help square away
> the issue.
> 
> Don
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Does your code think in ink? 
> You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
> What are you waiting for?
> http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
> --
> squirrelmail-users mailing list
> List Address: [EMAIL PROTECTED]
> List Archives:  
> http://sourceforge.net/mailarchive/forum.php?> forum_id=2995
> 
> List Info: 
> https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
> 
> 



-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to