> Hello Roalt,
> On Wednesday, November 06, 2002, Roalt Zijlstra wrote...
>
>> Hey people,
>
>> I think I found the problems in global.php.
>
>> Kinda tricky cos it is related to PHP version AND the
>> register_globals php.ini setting. In Sm 1.2.9 the sqsession_register
>> and sqsession_unregister do an extra check using:
>
>>     $rg = ini_get('register_globals');
>>     if ( !check_php_version(4,1) && empty($rg)) {
>
>> I think this is not entirely correct as I am using PHP 4.0.6 and
>> register globals = on, so the register/unregister won't use the
>> appropriate code for PHP 4.0.6, but the code for 4.1 and higher.
>
>   Well spotted.  This would probably be the reason I wasn't able to
>   replicate it myself using 4.2.3 :)  Thanks for the patch.
>
>> I made a patch for global.php for SM 1.2.9 which removed this check
>> and added session_(un)register. This is however not a really sound
>> fix, but it works. Maybe Jonathan can come up with a propper
>> solution.
>
>   You might want to check the orig file you used to create your patch
>   as it isn't showing as a total diff on the 1.2.9 (or 1.2.10[cvs])
>   file as it's not showing the addition of the above added code.  I'm
>   not sure a session_(un)register is needed as that is what the
>   ${GLOBAL VAR FOR VERSION} = 'value'; should be doing.  For example:
>
>     unset($HTTP_SESSION_VAR['name');
>
>     of
>
>     $_SESSION['name'] = 'value';
>
>   Thanks for the pointers though.  I've fixed the necessary
>   adjustments (I think) and committed it to cvs.  Those trying to run
>   1.2.9 (maybe even 1.2.8) or 1.2.10[cvs] should try getting a new
>   copy, details on how to get the cvs stable version are located on
>   the download page on the website :)

I had to add the session_register and session_unregister to get it working. I
must have been sleeping while making the diff :-)

I add the updated patch for those who don't want to play with CVS and also my
gloabl.php (for those who can't or dunno how to patch) for SM 1.2.9 which
should work with registers global = on and PHP 4.0.6.

Greetz,

Roalt Zijlstra

-- 
Project-Based Calendar System
http://www.pbcs.org
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] (Work)

Attachment: SM-1.2.9-global-2.patch
Description: Binary data

Attachment: global.php
Description: Binary data

Reply via email to