Author |
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 20 July 2017 at 3:20am | IP Logged
|
|
|
I'm testing the API for Afterlogic which have been working in the past but I see some strange error at the moment:
Error on line 577 in file /my/path/to/afterlogic/common/managers/integrator/manager.php
This is the @setcookie line here:
Code:
public function SetAccountAsLoggedIn(CAccount $oAccount, $bSignMe = false)
{
$aAccountHashTable = array(
'token' => 'auth',
'sign-me' => $bSignMe,
'id' => $oAccount->IdUser
);
$iTime = $bSignMe ? time() + 60 * 60 * 24 * 30 : 0;
$_COOKIE[self::AUTH_KEY] = CApi::EncodeKeyValues($aAccountHashTable);
@setcookie(self::AUTH_KEY, CApi::EncodeKeyValues($aAccountHashTable), $iTime, $this->getCookiePath(), null, null, true);
}
|
|
|
What can go wrong here ?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 July 2017 at 3:22am | IP Logged
|
|
|
What's the exact error recorded in PHP logs?
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 20 July 2017 at 4:32am | IP Logged
|
|
|
Hi Igor, I don't see anything logged in the PHP logs about it. I'm logging ALL!
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 July 2017 at 5:06am | IP Logged
|
|
|
Are you running the latest version 7.7.5 of WebMail Lite PHP?
You can determine the version number as described here.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 July 2017 at 5:07am | IP Logged
|
|
|
Also, try removing @ character prior to setcookie and see if there's any more verbose debug info in the logs.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 20 July 2017 at 5:51am | IP Logged
|
|
|
I'm still on an old version, 7.2.1
I tried that as well, no detailed error information. I'm pretty clueless there.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 July 2017 at 5:58am | IP Logged
|
|
|
Well my only guess at the moment is that, somewhere before setcookie call, some output is sent to the browser - and setcookie, just like any other case of sending headers, requires that there's no output done prior.
Other than that, can't really suggest anything else without error specifics.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 20 July 2017 at 6:35am | IP Logged
|
|
|
Hi, you might be right there.
I upgraded to the latest version and now I get a session variable back from:
Code:
$apiIntegratorManager->SetAccountAsLoggedIn($account)
|
|
|
After this nothing is done, I don't redirect webmail yet, I set my other sessionvariables for my app and login to my app, I enter my webmail lateron manually.
This actually worked before.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 July 2017 at 6:39am | IP Logged
|
|
|
From your last message, not really clear to me - does the issue still occur, or the error is gone?
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 20 July 2017 at 7:16am | IP Logged
|
|
|
The logout still happens indeed, only of the webmail, my app is OK.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 July 2017 at 7:18am | IP Logged
|
|
|
I'm sorry, the logout? Can you describe the issue in more detail, what exactly you're doing and what errors (if any) you see?
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 20 July 2017 at 7:29am | IP Logged
|
|
|
OK, the logout is more an message from (this) imap test server, I see it also happening when I run the same afterlogic install using a subdomain. What I do see happening is that the working subdomain version does not work as a relative path in my app, I get a blank screen when I load it in my iframe. I'm not able to reproduce that as I think I seen it before, any idea ?
OK, fixed! I needed to update my static JS files! Thanks for the fast reply Igor, you are fast these days!!
|
Back to Top |
|
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 20 July 2017 at 7:46am | IP Logged
|
|
|
Igor are you able to tell me what keeps the user logged in ? what is stored where with Afterlogic as I don't see any SESSION variable, only a cookie ?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 July 2017 at 7:52am | IP Logged
|
|
|
PHP sessions are only used in AdminPanel. As for main frontend of WebMail, p7auth cookie is used for that purpose. Thus, deleting the cookie effectively logs user out.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 20 July 2017 at 7:58am | IP Logged
|
|
|
OK, clear but how would that works when I loadbalance the webmail app between two backend servers, how do they know of each other the session exists ?
Is there something stored in the database ?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 21 July 2017 at 1:54am | IP Logged
|
|
|
No idea really, sorry, answering that would require involving the developers. If you're interested in getting consultancy services directly from our team, please contact us via HelpDesk. Thank you.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Yamakasi Newbie
Joined: 11 November 2013
Online Status: Offline Posts: 13
|
Posted: 21 July 2017 at 3:16am | IP Logged
|
|
|
Thanks, I don't need consulanty I just need to know how afterlogic handles it's sessions internally.
Could be in the docs somewhere.
|
Back to Top |
|
|