Created
January 20, 2011 09:20
-
-
Save juanramon/787624 to your computer and use it in GitHub Desktop.
Check if session is working well
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$session_path = ini_get('session.save_path'); | |
if( file_exists($session_path) ) { | |
echo 'Session path exists: ' . $session_path; | |
} else { | |
echo 'Session path doesn\'t exist: '; | |
echo $session_path; | |
exit(); | |
} | |
echo '<br/>'; | |
if( is_writable($session_path) ) { | |
echo 'Session path is writable'; | |
} else { | |
echo 'Session path is not writable'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment