Session_Regenerate_ID() not working on DW 8

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sunbin
Forum Newbie
Posts: 2
Joined: Wed Sep 13, 2006 10:17 pm

Session_Regenerate_ID() not working on DW 8

Post 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]
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

IDE.
mikesmith76
Forum Commoner
Posts: 34
Joined: Fri Aug 25, 2006 7:10 am
Location: Manchester, UK

Post 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.
Post Reply