I have been testing my pages on a Apache server and everthing worked. Now I have uploaded to my IIS Server and the sessions stopped working.
I have a login page that creates a session username and then goes to another page that has this code in it:
Hello
<?php echo $_SESSION['username']; ?>
What caused my sessions to stop working:
Here is a section of my php.ini file:
[Session]
; Handler used to store/retrieve data.
session.save_handler = C:\temp
; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = C:\temp
; Whether to use cookies.
session.use_cookies = 1
; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.
; session.use_only_cookies = 1
; Name of the session (used as cookie name).
session.name = PHPSESSID
; Initialize session on request startup.
session.auto_start = 0
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 180
; The path for which the cookie is valid.
session.cookie_path = C:\temp
; The domain for which the cookie is valid.
session.cookie_domain =
; Handler used to serialize data. php is the standard serializer of PHP.
session.serialize_handler = php
Thanks for your help