Before you start working with sessions, check a value in your php.ini file. Look for this section of text and read it carefully:
; 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. [much more explanatory text skipped] session.save_path = /tmp
What the text in the php.ini file says is, essentially, that you must modify the value of session.save_path so that the file can be written to a directory that exists. This change primarily affects Windows users, and the modification is simple.
Enter a directory name after the = for session.save_path. For example, my php.ini file on Windows contains this:
session.save_path = c:\temp
After making the change, restart Apache so that the change takes effect. If you are using Linux/Unix, /tmp is a standard directory, and you can leave this alone unless you want to change it for some compelling reason.