RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / Variable {$_SESSION['uid']} is lost
Posted:  08 Apr 2014 15:51
Hi,

When I open the page with the users, and click on Edit,

http://adex.ru/plan/LC-pic01.jpg

I get an error page.

http://adex.ru/plan/LC-pic02.jpg

After that, no one page does not work until you press the Logout button.

Bug LuxCal or hosting?
Posted:  08 Apr 2014 17:46
Hi Damon,

I tried to reproduce this error in our test calendars, but I couldn't; all worked fine.
Nobody else reported this problem, so I don't know why this happens.

Can you create a new user and thereafter edit this new user?
If not, can you edit event categories?

Roel
Posted:  09 Apr 2014 11:55
Obscure error messages, not the best writing programs.
Decided to print an error message and, indeed, the variable _SESSION is not defined.

Notice: Undefined variable: _SESSION in /home/d/damon/public_html/plan/common/toolbox.php on line 176
Warning: array_merge() [function.array-merge]: Argument #7 is not an array in /home/d/damon/public_html/plan/common/toolbox.php on line 176
Warning: Invalid argument supplied for foreach() in /home/d/damon/public_html/plan/common/toolbox.php on line 177

Link - http://adex.ru/plan/index.php
Posted:  09 Apr 2014 11:58
PHP Version 5.3.18
Apache/2.2.19
MySQL: 5.1.58
Posted:  09 Apr 2014 12:19   Last Edited By: Damon
Using Register Globals !!!
Warning: This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
Posted:  09 Apr 2014 12:30
Understood!
Using the LuxCal with the option register_globals 'on' leads to errors and incorrect operation of the script.
Posted:  09 Apr 2014 21:27
Hi Damon,

Since long we've added some lines of code copied from the PHP Reference Manual to deal with situations where register_globals are 'on'. See index.php lines 35-36 and common/toolbox.php lines 171-181.

Is this not properly working maybe . . .
Roel
Posted:  11 Apr 2014 14:29
Hi Damon

did you solve this problem? I'm experiencing the same. Can you tell me how did you solve it?
Posted:  11 Apr 2014 22:12   Last Edited By: Roel B.
Hi Pulsar,

If your ISP has put PHP register_globals 'on', this is an insecure situation. They should be switched 'off'.
This can best be done in the php.ini file.
See also this article: https://www.interspire.com/support/kb/questions/807/How+to+disable%7B47%7Dturn+off+register_globals+for+PHP

Roel
Posted:  12 Apr 2014 11:35
Hi Roel

thank you so much. That was the problem. Now it work great. Nice program and you deserve a donation thump_up

Cheers
Mark
Posted:  15 Apr 2014 10:56
Hi Roel

what if the hoster does not allow to disable register_globals? Is it possible to allow the calendar to work with with register_globals on? and if yes what exactly should I change in the code?

Mark
Posted:  15 Apr 2014 18:30   Last Edited By: Roel B.
Hi Mark,

It's unlikely the ISP doesn't allow turning register_globals off; it's common knowledge that enabling register_globals is a security risk (variable poisoning).
LuxCal already has a function "unregisterGlobals" in the toolbox.php file which is copied from the PHP manual and which should eliminate the security risk.
Unfortunately we introduced an error when copying this function sad

This error can be corrected by editing the file common/toolbox.php and changing line 178 from . . .

   if (!in_array($global,$knownGlobals) and isset($GLOBALS[$k])) { unset($GLOBALS[$k]); }

to . . .

   if (!in_array($global,$knownGlobals) and isset($GLOBALS[$global])) { unset($GLOBALS[$global]); }

Thanks for reporting this problem.
Roel