when I uploaded the script to the server I got this error
Warning: Unknown: open(/tmp/sess_58f54ee6a828f04116c2ed97664497b2, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
the error appeared when I call session_start();
although I set the permission of /tmp folder to 777 .
Add following line
before
I had this problem in the following situation:
Conclusion: For an irrelevant reason I had to change my PHP version, and while switching with sessions alive, the sessions get corrupted.
If :
Then you'll see this error when e.g. the Apache PHP process attempts to run garbage collection on the session files.
Fixes :