Skip to content

Instantly share code, notes, and snippets.

@juanramon
Created January 20, 2011 09:20
Show Gist options
  • Save juanramon/787624 to your computer and use it in GitHub Desktop.
Save juanramon/787624 to your computer and use it in GitHub Desktop.
Check if session is working well
<?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