424,299 Members | 2,215 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,299 IT Pros & Developers. It's quick & easy.

PHP Session issue with different directory

P: 93
PHP Session issue with different directory

Application structure :

root_directory :
- login.php
- register.php

- memberprofile.php
- test2.php

- managerprofile.php
- test3.php
- test4.php

When any member/manager will login from root/login.php (the session created) and redirect to particular directory.
if member login, he will be redirect to root/member/memberprofile.php

When i was in my development mode with xampp, it was working fine but when the applicatoin has been uploaded to live windows server. The session issue has been occurred.

When the member/manager will login then on the next page (root/member/memberprofile.php), the session value has not been read and the script redirect him to login page as the session is not set.

The main issue is, session values are not accessible in other directory. I have tried to store the session files in new common directory (root/temp) but still facing the same issue.
Aug 31 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.