From: J. B. <jb...@tw...> - 2003-07-26 22:49:49
|
Hmmm. A BIG problem here: When messages are composed using HTMLArea, SquirrelMail does NOT send them the proper way (i.e. with the encoding specified as text/html, the funky two-part attachment thingy... I don't know the proper terminology since I HATE HTML email and have only messed with it once or twice as a coder ;) ). Instead of seeing the nifty colorized crud you send, it shows up in SquirrelMail as (test this yourself... use HTMLArea to send a message to yourself, and read it) as code... i.e. you can see the entities, and none of the tags work. Example: ---------------------------------------------------------------------------- This is a test. Blah blah blah.<BR><BR>This is a <STRONG>test</STRONG>... this is a <U>test</U>...<BR><BR><FONT face=impact color=#ff0000 size=5>This is a TEST!!!</FONT> ---------------------------------------------------------------------------- Could someone fix this? On Sat, 26 Jul 2003, Jonathan Angliss wrote: > On Saturday, July 26, 2003, Jonathan Angliss wrote... > > > Hello J., > > On Saturday, July 26, 2003, J. Blank wrote... > > >> Certainly. Am mailing you offlist with the info. > > > FIXED!!! > > Based on the fact that PHP is a pain in the ass sometimes, I managed > to track down the real cause for it not working... References. For > those that aren't so sure, the cause is that we try to make everything > as simple as possible for everybody. The standard global variables are > now available via a bunch of arrays: > > $_SERVER, $_GET, $_POST, $_SESSION, $_COOKIE > > These cookies provide you with access to certain information, and have > been available to use since PHP 4.1.0. Now, something similar to this > _was_ available in PHP versions earlier than 4.1.0, they were in the > format: > > $HTTP_SERVER_VARS, $HTTP_GET_VARS.... etc > > The problem is, they aren't what PHP called super globals. To use > them, you have to define them (unless using register_globals set to on > in your php.ini file). Well that is where the fun bit comes in, we try > to trick PHP into always using our nice short-hand $_ variables (see > functions/global.php), and we're supposed to be able to simple call > the variables, but in earlier versions of PHP, you still have to > declare them as global. The developer of the plugin didn't do that, so > I did so... but STILL found PHP didn't behave quite right.... The > problem results in PHP's session handler, where all our important > information is being kept. > > PHP won't start a session, and won't make available the > $HTTP_SESSION_VARS or the $_SESSION vars until a session is started. > Most people tend not to notice when other plugins are included first, > but this is a case where I'd set it so that this was my only plugin, > and a session hadn't been started before global.php had been included, > and fixed all the vars by reference (making $_SESSION = > $HTTP_SESSION_VARS). What ends up happening then is the vars are not > available when we go to call them. > > There are two possibilities to this, and I think one if them I might > end up deploying into the main code as it does affect all version. The > session isn't started, we then map an empty session array to another > array, and hence no data, so cannot load the plugin. Which in most > cases never happens, but in times it does. Quick solution... add the > line: > > sqsession_is_active(); > > In or around line 33 just above the "if (!check_php_version(4,1) ){" > line or functions/global.php. This line starts a session if one isn't > active, or ignores the code if one is already started. The other > solution, is manually start a session yourself, and reassign the > variables (lots more work). > > -- > Jonathan Angliss > (jo...@sq...) > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > -- > squirrelmail-plugins mailing list > List Address: squ...@li... > List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins > http://squirrelmail.org/cvs > J e s s i c a L e a h B l a n k |