yong615
asked on
PHP SESSION doesn't pass value to sub or upper directory on Linux
Hi guys,
I have a problem but I don't know why and where to look at it.
I have a php script in main directory and the script include a php file in the sub-directory. The file in the main directory is called index.php and the include file is login.php. Index.php calls login function and the function generates $_SESSION['user']. The problem is that the session value is stays in the sub-directory where the fuction is. I tested the session value and the session value was created but I cannot use the session in the main directory. I have some other php scripts in the same sub directory and they are passing the session value but not second sub directory and main directory. The session value stays in same folder where it was created. I checked same scripts on the XP and it works fine. In this case, where should I look for?
I have a problem but I don't know why and where to look at it.
I have a php script in main directory and the script include a php file in the sub-directory. The file in the main directory is called index.php and the include file is login.php. Index.php calls login function and the function generates $_SESSION['user']. The problem is that the session value is stays in the sub-directory where the fuction is. I tested the session value and the session value was created but I cannot use the session in the main directory. I have some other php scripts in the same sub directory and they are passing the session value but not second sub directory and main directory. The session value stays in same folder where it was created. I checked same scripts on the XP and it works fine. In this case, where should I look for?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.