Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Session Timeout Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Dillon
Newbie
Newbie


Joined: 12 January 2010
Online Status: Offline
Posts: 5
Posted: 21 December 2010 at 4:46pm | IP Logged Quote Dillon

Hello, I am using webmail lite. I am trying to integrate my email section and user login section. For some reason it works fine to login the email with internet explorer, but when using with firefox, or chrome it doesn't work, and gives the error "The previous session was terminated due to a timeout."

I went by this guide, and am using the two files on example 2.

http://www.afterlogic.com/wiki/Integrating_into_another_web_ application_%28WebMail_Lite_5_PHP%29

Here is my code for index.php

<?php

session_start();

// Store credentials in session
$_SESSION['email'] = 'testuser@mysite.com';
$_SESSION['login'] = 'testuser@mysite.com';
$_SESSION['password'] = 'pass';
?>
<iframe src="test-iframe.php" style="width: 900px; height: 600px;"></iframe>

And heres the code for test-iframe.php

<?php
include('../../email/integr.php');
session_start();
$Integr = new CIntegration('http://www.corfufiredept.com/email/');

if (!$Integr->UserLoginByEmail($_SESSION['email'], $_SESSION['login'], START_PAGE_IS_MAILBOX, $_SESSION['password']))
{
    echo 'Error: failed to log into the account. Reason: ' . $Integr->GetErrorString();
}
?>

I thought it was strange to work on one web browser but not the others.. Thank you for any suggestions!

-Dillon
Back to Top View Dillon's Profile Search for other posts by Dillon
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6089
Posted: 22 December 2010 at 12:05am | IP Logged Quote Igor

Are both the scripts located under the same domain? Also, if you supply an
absolute filesystem path for include, does that help?

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Dillon
Newbie
Newbie


Joined: 12 January 2010
Online Status: Offline
Posts: 5
Posted: 22 December 2010 at 7:52am | IP Logged Quote Dillon

Hello, yep I have everything on the same domain.

I just tried an absolute include path as shown below-

include('http://www.mydomain.com/email/integr.php');

But with that I am getting this error:

Fatal error: Class 'CIntegration' not found in /home1/corfufir/public_html/newsite/login/test-iframe.php on line 4

This is what I have on line 4.

$Integr = new CIntegration('http://www.mydomain.com/email/');

Thanks

-Dillon
Back to Top View Dillon's Profile Search for other posts by Dillon
 
Dillon
Newbie
Newbie


Joined: 12 January 2010
Online Status: Offline
Posts: 5
Posted: 22 December 2010 at 8:43am | IP Logged Quote Dillon

Ok, I got it to work! I had on line 4 using an absolute path to the webmail folder-

$Integr = new CIntegration('http://www.mydomain.com/email/');

I had to set it to a relative path for it to work!-

$Integr = new CIntegration('../../email/');

-Dillon
Back to Top View Dillon's Profile Search for other posts by Dillon
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide