Node.js , Socket.io access cookie data from subdomain

I have a php file which connects to node.js using socket.io.

I need to fetch the cookies and use the data in it for creating the response that I have to send back. Now the problem is my PHP application is at localhost/subdomain, while I am running the server at localhost:8124.

So when I use socket.handshake.headers.cookie it returns the cookies stored at localhost and not at localhost/subdomain as a result of which I only get phpsessid and not the cookie data.

What should I do?

SOLVED !! Just set cookie path "/" in php !! Then it is available throughout the domain !! Leave socket.io and node.js scripts as they are !!