Session_unset (); Session_destroy (); echo "<script language=javascript>parent.location.href= ' Admin_Login.php ' </script> ";
With this command, always out of the background, hint Session_destroy () failed, encountered this problem, has been thought to be a PHP version of the problem, so has not cared, today want to solve this problem thoroughly, so the study was found that the original is not a PHP version of the problem, It is the permissions of the file that holds the session.
Let's take a look at the php.ini file with this configuration:
Session.save_path = "D:/host/php/temp"
This configuration is used to set the location of the session variable, it is amazing, the session also like a cookie, is stored as a file on the server.
And with Session_destroy (), the command is to put the following stored in the session file inside the variable is deleted, if the permissions of this folder is not enough to operate.
So you need to set the permissions of this temp folder.
Adding a users permission to this file is OK.
PHP background site exit with Session_destroy () The Session object destruction failed error resolution