RaythMistwalker Posted January 6, 2010 Share Posted January 6, 2010 <?php ini_set('display_errors', 'on'); error_reporting(E_ALL); //Start session session_start(); $sessId=$_SESSION['SESSION_ID']); //Unset the variables stored in session unset($_SESSION['SESS_MEMBER_ID']); unset($_SESSION['SESSION_ID']); //Remove Session from Database include('config.php'); //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select database $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } $qry="DELETE FROM sessions WHERE sess_id=$sessId"; $result=mysql_query($qry); mysql_close(); ?> Ok basically this worked before when i never had to connect to the database to remove session info. Now it isn't logging out and just showing blank page. my mind is just blank and i think its missing something stupid like ( [ ) ] or ; but i can't see it. anyone? Quote Link to comment https://forums.phpfreaks.com/topic/187411-logout-page-error-after-update/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 6, 2010 Share Posted January 6, 2010 You have a fatal parse error on line 6. Fatal parse errors are only displayed when you set the error_reporting/display_errors settings before your script is parsed. You need to set those two values in your master php.ini on your development system to save yourself a lot of time. Quote Link to comment https://forums.phpfreaks.com/topic/187411-logout-page-error-after-update/#findComment-989676 Share on other sites More sharing options...
RaythMistwalker Posted January 6, 2010 Author Share Posted January 6, 2010 unfortunately i don't have access to php.ini $sessId=$_SESSION['SESSION_ID']); I don't see what's wrong with that? nvm got it Quote Link to comment https://forums.phpfreaks.com/topic/187411-logout-page-error-after-update/#findComment-989677 Share on other sites More sharing options...
PFMaBiSmAd Posted January 6, 2010 Share Posted January 6, 2010 You should be learning php, developing php code and debugging php code on a local development system, for a couple of reasons. Doing this on a live server wastes a huge amount of time in constantly uploading files on every alteration and until your code is complete and tested it likely contains security holes that would allow a hacker to exploit your server. You can set those two settings in a .htaccess file (when php is running as an apache module) or in a local php.ini (when php is running as a CGI application.) Quote Link to comment https://forums.phpfreaks.com/topic/187411-logout-page-error-after-update/#findComment-989682 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.