RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / LuxCal / Comments and Suggestions / SSO not working
Posted:  18 Dec 2012 05:53
Okay, I am frustrated.  Here's what I do ... after developing and testing any/all pages within XAMPP, I upload successful pages to a free web server for further testing and evaluation.  I had no problems getting 273 to install okay within XAMPP.  SSO connected flawlessly on the calendar page.  I tried to install 273 on the free server and bombed out with error message "not permitted (install)".  So, I exported the calendar via mysql ( XAMPP ) and imported into mysql ( server ).  I ran the lcconfig273 and got connected.  I saved the settings and destroyed the lcconfig273 file as directed.  I fired up the server pages and saw identical information.  Everything went smoothly, except I noticed that page did not auto-login.

Because I uploaded the exact same index page, all variables would be the same, including sessions.  The page automatically defaults to "public view".  I can login in via the login screen, but I am wondering what happened.  Could something have gone south on me by exporting/importing?  All my other pages work with my sessions, so could there be something different doing the "install" process?
Posted:  18 Dec 2012 12:03   Last Edited By: Roel B.
Hi there,
"not permitted (install)"
The message "not permitted (install)" you got when installing on the free server was most probably caused by the fact that you launched the install.php script directly, not via the index.php script. It should be started via the index.php script: when the index.php script doesn't find the file with configuration data (lcaldbc.dat for LuxCal v 2.7.2, or lcconfig.php for LuxCal v2.7.3) it will automatically start the install.php script.
But what you've done is fine as well (copying the database, uploading all LuxCal files and creating the config file lcconfig.php with the config tool lcconfig273.php.

SSO not working
Just to be sure: Single Sign On means that you have embedded the calendar in an other web page which requires authentication. When a user logs in to the parent page, he/she will be automatically logged in to the calendar as well. The mechanism for SSO hasn't changed in LuxCal v2.7.3. So if this doesn't work any more, I expect that on the parent page the starting of PHP sessions or the setting of the PHP variable $_SESSION['lcUser'] is not successful. Both are a prerequisite for the SSO to function.
If this is not what you mean, please let me know.
Roel
Posted:  18 Dec 2012 15:19   Last Edited By: Danwestlake
Hello,

I haven't been able to get SSO working either with my other program. I've tried a few different things and I either get an error or it doesn't work and just displays the command as a text entry.

I posted it on the forum of the other program a couple of days ago and no one has replied with any suggestions for a possible solution.

When I use this entry. I put this in labdcalendar.php just before the last include.

Code:


// SSO Load for LuxCal
  $_SESSION['lcUser'] = user email; 


It generates this error.

Code:


Parse error:  syntax error, unexpected T_STRING in /home/content/.../html/hostedsites/londonareabusinessdirectory.com/labdcalendar.php on line 13


Thanks
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  18 Dec 2012 22:35   Last Edited By: Roel B.
Hi Dan,
The problem here is that you should replace "user email" by a real email address of the visitor between quotes.
So it should look as follows:

Code:


// SSO Load for LuxCal
$_SESSION['lcUser'] = 'johneast@bt.com';

And the of course this email address should match with a user registered in the calendar.
Roel
Posted:  19 Dec 2012 00:49
Hi Roel,

Ok, and just how do I know what the user is going to log in?

Perhaps I'm not understanding how SSO is suppose to work. Here is what I thought it was doing.

I log into my main program with an email address of me@somewhere.com which is stored in the session. I then go to log into LuxCal and it reads the session information grabs the email address of me@somewhere.com  and checks to see if the email address is in the LuxCal database, it is so it logs me in without needing a password.

I can't hard code the email address in because then it only works for one email address. If that's the case it certainly won't work for my 300 users.

Thanks
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  19 Dec 2012 22:01
Hey Dan:

I have the exact same issue.  My page lets me read my session variables, both server and xampp.  I still can't auto SSO.  I tried single quotes and double quotes, but nothing.  Oddly, everything under xampp works perfectly, but the server side just stares at me like a deer in headlights.  I gonna have a few drinks and attack it again.
Posted:  20 Dec 2012 13:37
Hey Pepe

I use a free product called osTicket. Another developer wrote a FAQ program, osFAQ that can be used with it so only one registration and when you log in you are logged in on both at the same time. The only reason I mention it is because it is completely transparent to the user and makes administration easy.

I believe the that is the purpose and goal of SSO, to make it transparent to the user and ease. About the only difference I see is we don't seem to be able to have it grab the details on the fly and when a person registers for one, behind the scenes, it is like they registered for both at the same time with the same user id and password.

Of course using my brain and looking at it, the documentation doesn't say it will do that, only that it uses the session info for that user or email address.

If my understanding now is truly correct. I have an admin login so I store that and then with the SSO when I login I'm good for both programs, my other 300 users it doesn't work for unless I manually add them.

Again my understanding could be flawed.

Regardless, LuxCal is still one heck of a product and Roel is doing a fantastic job with it and its' support.

Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  21 Dec 2012 00:38
Hi Dan:

I don't think your understanding is flawed.  This is what is I gather.  Your peoples log into your website and you store the user into a session variable.  When your luxcal page opens it should read that variable and check it against the table.  Ultra transparent, BUT, for some reason we can't.

I know it works without a hitch under xampp, but not on my server.  Part of the problem is that I can view the session file under xampp and confirm what is there and what is not.  That option I do not have under my server.  I will have users re-enter there information until I figure this out.

I wonder if others have the same problem or whether it is my server.  And yes, Roel has an amazing program and actutally gets back with a solution.
Posted:  21 Dec 2012 11:46
This SSO business is on my list to address in the "near" future. SSO and PHP sessions are a real challenge, in particular when there are more than one calendars involved.
Roel
Posted:  21 Dec 2012 13:59
I can certainly understand how difficult it must be. For now it's not like they can't log in separately to post. Take a deep breath and take one step and thing at a time. wink

Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  24 Feb 2016 15:35
I am using Processwire CMS, it handles Sessions automatically. I have done following things but SSO is not working.

<?php $_SESSION["lcUser"]="$caluser"; ?>   //where $caluser is email id
   
<iframe id="lcmini" src="<?php echo $config->urls->site ;?>/luxcal/lcmini.php"></iframe>

<?php echo session_id(); ?>

this is not working for SSO. so I just checked and found that the session name and session ids are different in my web page(parent site) and in details page of the mini-calendar(coming  from Iframe).

Any help is much appreciated.

Tthanks