Cake integration with other app and session

2008-05-08 Thread Ziad

Hi everyone,

I have an issue that I'd like people's comment(s) on. I am trying to
integrate an existing app with Cake. We are planning to move the
entire app over to Cake eventually but will have to do it in stages.
So we are planning to write new parts of the app in Cake and slowly
move old stuff over.

The problem that I was having was with sessions. It seems that Cake
closes any existing session before doing anything with sessions within
Cake. Session data from my other app is available in Cake. But session
data that I save in Cake is not available in the other app. I've got
around this by commenting out line 167 in cake/libs/session.php:

function start() {
if (function_exists('session_write_close')) {
//  session_write_close();  -- this line
}
$this-__initSession();
return $this-__startSession();
}

This seems to work fine but I was wondering if any of the Cake experts
could point out any negative implications/side effects of doing this.
I would really appreciate any feedback from you guys.

Thanks in advance.

Ziad

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake integration with other app and session

2008-05-08 Thread Esoteric

I second this, I was about to post something here, when I saw this
one.

I am basically looking to integrate another applications session
system into my CakePHP application. The other application be
vbulletin. I haven't really began to see what the best way to do this
would be but comments from others would be nice at the same time,
since I believe our two questions are related. If not I will start my
own email.

Thanks,
-Erik

On May 8, 6:55 am, Ziad [EMAIL PROTECTED] wrote:
 Hi everyone,

 I have an issue that I'd like people's comment(s) on. I am trying to
 integrate an existing app with Cake. We are planning to move the
 entire app over to Cake eventually but will have to do it in stages.
 So we are planning to write new parts of the app in Cake and slowly
 move old stuff over.

 The problem that I was having was with sessions. It seems that Cake
 closes any existing session before doing anything with sessions within
 Cake. Session data from my other app is available in Cake. But session
 data that I save in Cake is not available in the other app. I've got
 around this by commenting out line 167 in cake/libs/session.php:

 function start() {
 if (function_exists('session_write_close')) {
 //  session_write_close();  -- this line
 }
 $this-__initSession();
 return $this-__startSession();
 }

 This seems to work fine but I was wondering if any of the Cake experts
 could point out any negative implications/side effects of doing this.
 I would really appreciate any feedback from you guys.

 Thanks in advance.

 Ziad
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake integration with other app and session

2008-05-08 Thread Chris Hartjes

On Thu, May 8, 2008 at 6:55 AM, Ziad [EMAIL PROTECTED] wrote:

 The problem that I was having was with sessions. It seems that Cake
 closes any existing session before doing anything with sessions within
 Cake. Session data from my other app is available in Cake. But session
 data that I save in Cake is not available in the other app. I've got
 around this by commenting out line 167 in cake/libs/session.php:

Sometimes this happens depending on the security level in
config/core.php.  If you have it set to high, it recreates the session
on every page load.

Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake integration with other app and session

2008-05-08 Thread Ziad

Hi Chris,

Thanks for your response, that certainly goes some way towards
explaining why it happens. What about my question of do you see any
issue/problem with commenting out this session recreation code?

I guess there is the general issue of sharing session data between two
applications, but if both applications are generally secure then are
there any other issues that people can see? Sorry to be somewhat
pedantic about this, its just that if anyone out there can see an
issue then that would save me getting too deep into this before having
to pull back.

Thanks again.

On May 8, 4:59 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
 On Thu, May 8, 2008 at 6:55 AM, Ziad [EMAIL PROTECTED] wrote:

  The problem that I was having was with sessions. It seems that Cake
  closes any existing session before doing anything with sessions within
  Cake. Session data from my other app is available in Cake. But session
  data that I save in Cake is not available in the other app. I've got
  around this by commenting out line 167 in cake/libs/session.php:

 Sometimes this happens depending on the security level in
 config/core.php.  If you have it set to high, it recreates the session
 on every page load.

 Hope that helps.

 --
 Chris Hartjes
 Internet Loudmouth
 Motto for 2008: Moving from herding elephants to handling snakes...
 @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---