Jump to content

Logout dos'nt work with PHP5/IIS6


mickeymick

Recommended Posts

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

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);

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.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.