Jump to content

Clarification on cookie access needed


weemikey

Recommended Posts

Hi all!

 

So I'm incorporating a php document manager (DM) into a contact manager (CM) that I built in php. The DM is a system that I paid for and customized a bit. The DM has its own login screen which, when successful, sets a PHPSESSID cookie. If I look at the properties of the cookie I see this:

 

Content: a session ID

Host: my domain

Path: /dm/

Expires: at end of session

 

So I'm TRYING to be able to use this cookie in my system. So far I can't refer to it or "SEE" it. I assume access to the cookie is tied to the piece of code that set it in the first place.

 

Also if I link BACK to the DM from my CM I get the login screen again. So to me that says that the DM session ended when I clicked the link into the CM.

 

Here's the questions:

- who can SEE the cookie set by the DM? I thought that it was perhaps PATH specific so I moved my code into the /dm/ directory. Doesn't seem to work.

- are there properties of a cookie that I can somehow exploit to make these two systems get along?

 

I'd REALLY appreciate some help. I'm doing a demo on Wed and this should be working!

 

Thanks,

Mikey

 

 

Link to comment
https://forums.phpfreaks.com/topic/71403-clarification-on-cookie-access-needed/
Share on other sites

What code would you like to see? The DM code is really dense and I don't actually understand tons of it. I see no "session_start()" anywhere, which is confusing to me, as I thought that was essential.

 

I don't have any code on my side to show, as all I've done is try to echo out cookie values, but each time I try, a NEW cookie is set by my php code. I'll try to show you whatever you'd like, but this is really just a GENERAL question about how access to a cookie is determined.

 

Well, I figured ONE piece of the puzzle. I had to move MY code into the same directory, because of course the cookie is set to the DM directory. So now I'm happy as a clam, able to grab the SESSION vars set in the DM. You're right in that I should have had access to the cookie.

 

Now my ONLY issue is when I go BACK to the DM from my code I still go straight to the login. I need to pore over the DM code and see WHY it wants to do a login.

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.