mickeymick Posted July 8, 2008 Share Posted July 8, 2008 hi, i upload my website on server that using php5/IIS6 and logout function not working code im using for logout is following but its working fine on my local where im using php5/apache. code: session_start(); // i also tried to empy session variables $_SESSION['LogedStatus'] = ""; $_SESSION['LogedUser'] = ""; $_SESSION['LogedUserID'] = ""; //also tried to uset session variables unset($_SESSION['LogedStatus']); unset($_SESSION['LogedUser']); unset($_SESSION['LogedUserID']); //also tried to unset session itself session_unset(); session_destroy(); header("Location: " . $_REQUEST['ru']); all this code working fine on my local php5/apache2 but on server it dosnt work. plz tell me if i need to do something with php.ini on server or any thing im doing wrong ? Link to comment https://forums.phpfreaks.com/topic/113723-logout-dosnt-work-with-php5iis6/ Share on other sites More sharing options...
craygo Posted July 8, 2008 Share Posted July 8, 2008 Try the manual http://us.php.net/function.session-destroy Ray Link to comment https://forums.phpfreaks.com/topic/113723-logout-dosnt-work-with-php5iis6/#findComment-584414 Share on other sites More sharing options...
PFMaBiSmAd Posted July 8, 2008 Share Posted July 8, 2008 If the session_start() is not actually resuming the session, all the code that references the session will have no effect. Add the following two lines after your first opening <?php tag - ini_set ("display_errors", "1"); error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/113723-logout-dosnt-work-with-php5iis6/#findComment-584483 Share on other sites More sharing options...
libertyct Posted July 8, 2008 Share Posted July 8, 2008 just a tip. try to make your development environment as identical to your deployment environment as much as possible to avoid this type of trouble. I almost got screwed when I completed a project that used PHP-DOM and everything worked fine on my localhost, soon as i put this thing online (this is around project launch mind you lol) i discover my host doesn't support PHP-DOM. Link to comment https://forums.phpfreaks.com/topic/113723-logout-dosnt-work-with-php5iis6/#findComment-584520 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.