Page 1 of 1

Session_Regenerate_ID() not working on DW 8

Posted: Wed Sep 13, 2006 10:42 pm
by sunbin
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi

I am using DreamWeaver 8, php 5, and Xitami Web Server to run my scripts.

I tried to use session_regenerate_id() on a logout.php, it look as below:

Code: Select all

<?php
	session_start();
	setcookie("SessionON", false, time()-3000);
	
	session_unset();
	session_destroy();
        session_regenerate_id();
?>

<html>
	<head>
	<meta http-equiv="refresh" content="0;url=index.php">
	</head>
</html>
but the strange thing is... dreamweaver 8 did not hightlight the syntax "session_regenerate_id()" at all. The script did not regenerate an new session_id upon logout too.

I'm not sure where the problem lies, the IDE? or the PHP?
Hope the dev community can help me out, thanks.


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Thu Sep 14, 2006 3:35 am
by Jenk
IDE.

Posted: Thu Sep 14, 2006 3:58 am
by mikesmith76
Can i just ask - why would you call session_regenerate_id() on a logout page? Surely it is enough to simply destroy the session and any cookies associated with it?

And as for dreamweaver not highlighting the function, i don't think it recognises it. seen the same thing myself a few times.