views:

34

answers:

1

Hello, I have two websites on one server, with urls http://testintranet/ && http://mvc.testintranet/ until now they'be just running plain php. I have been able to transfer a user between the two sites, and maintain their session using a get header: /?session_id=26c81c54a93e145ba2cc50a43d77c4ca

I've had no problem doing this so far, but I'm trying to put cakephp on the second one, cakephp seems to be overriding the session id. How can I stop cakephp from doing this?

To be precise, http://testintranet is the plain php, and I'm trying to transfer session info from that site to http://mvc.testintranet which is running cake.

+1  A: 

Glibly
I'm pretty sure that you could use a combination of controller logic and a small modification to your form to accomplish this. I feel there may be a better alternative, but I don't have time to look to far into it before I go to work. This solution should work just fine, but I've never tested anything like this, so let me know.
In your form, you'll want to change the action a little, using whatever variable you're storing your session_id in instead of $_SESSION['id']:
form action="http://mvc.testintranet.com/controller/action/" method="post" then in your controller method (for this example, view):

function view($sessionId = null) {
if($sessionId) {
//do whatever you need to do here. For Example:
$this->Session->write('Session.id', $sessionId);
}

Tada. Hope this helps, let me know how it works for you.

Kai
Hello Kai, thanks that did the job.
Glibly