Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
142 views
in Technique[技术] by (71.8m points)

php - $_Session not starting in one folder but is starting in another using xampp

I have 2 folders running 2 sites locally using xampp. One is starting and using $_Sessions with no problems at all but the other gives me the following error:

Warning: Unknown: open(/tmpsess_g8qhtuskd0pms61ja3k0h9chui, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to read session data: files (path: /tmp) in Unknown on line 0

Warning: session_start(): open(/tmpsess_g8qhtuskd0pms61ja3k0h9chui, O_RDWR) failed: No such file or directory (2) in C:xampphtdocsWebsite7.01.2021est4.php on line 1

Warning: session_start(): Failed to read session data: files (path: /tmp) in C:xampphtdocsWebsite7.01.2021est4.php on line 1

Both the folders have the same permissions, xampp (php.ini) is setup correctly as it is working fine on the one site. Even running a simple script is not working:

 session_start();

if (isset($_SESSION['FirstName'])) {
    /// your code here
} 

The folders containing the sites are in the same root folder. (C:/xampp/htdocs) Any ideas?

question from:https://stackoverflow.com/questions/65926895/session-not-starting-in-one-folder-but-is-starting-in-another-using-xampp

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...