Hi All,
Well, I've been looking in the wrong place for this error logging in
issue with 1.2.8 and higher. The issue was in fact fixed yesterday
by Thijs, and was also pointed out by Roland Fritz who did some
debugging which I wasn't able to do. The issue itself wasn't in the
sqsession_register or sqsession_unregister (although there was a bug
there), but in check_php_version. The issue was a result of a patch
level in the PHP. The reason it came up for a lot of users is
because those using packaged systems (such as RedHat, suse, and
such) often start off with a patch level, so the version is 4.0.4-1
for example. Our check_php_version removes all non-numeric values
and checks against a minimum requirement so it'd be trying to see if
the level you have was greater that 410. Clearly 4041 is bigger
than 410, so it'd run the wrong code. So here is a proper fix for
it now:
function check_php_version ($a = '0', $b = '0', $c = '0')
{
global $SQ_PHP_VERSION;
if(!isset($SQ_PHP_VERSION))
$SQ_PHP_VERSION = substr( str_pad( preg_replace('/\D/','', PHP_VERSION), 3,
'0'), 0, 3);
return $SQ_PHP_VERSION >= ($a.$b.$c);
}
function sqsession_register ($var, $name) {
if ( !check_php_version(4,1) ) {
global $HTTP_SESSION_VARS;
$HTTP_SESSION_VARS["$name"] = $var;
}
else {
$_SESSION["$name"] = $var;
}
}
function sqsession_unregister ($name) {
if ( !check_php_version(4,1) ) {
global $HTTP_SESSION_VARS;
unset($HTTP_SESSION_VARS["$name"]);
}
else {
unset($_SESSION["$name"]);
}
}
The above code is what is in CVS (and what has been in cvs since
yesterday afternoon). I hope this fixes everybody's issues.
--
Jonathan Angliss
([EMAIL PROTECTED])
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
--
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