looks like you don't have write access to the /tmp directory (where sessions are saved by default). Does your host advertise that they allow PHP sessions? There are two possibilities:
1. you can specify another directory to save session files in.
This is actually preferable anyway, since it closes a BIG security hole by moving session information OUT of /tmp, which is a shared directory on most webhosts. Try the following:
PHP Code:
<?php
// this is the directory below your web root:
// you should actually create a new directory there to handle your sessions
// (so you don't have session files mixed up with other stuff).
// as written, this code will tell you IF this solution will work,
// but you shouldn't just use it "as-is."
/*
FOR EXAMPLE, if your web root is something like /home/users/TwitterRooms/public_html/,
you can create the directory /home/users/TwitterRooms/session_tmp/
(and use that path as $sessionPath).
*/
$sessionPath = realpath( $_SERVER['DOCUMENT_ROOT'].'../' ).'/';
session_set_path( $sessionPath );
session_start();
/* rest of your code here */
2. your web host doesn't allow PHP sessions (or something that sessions require, like filesystem access).
If this is the case, you need to find a better web host.
Even free hosts are "useless" and "inexcusably lousy" if they support PHP, but disable these basic features.
Try this:
PHP Code:
<?php
print phpinfo();
?>
you need to look for the section entitled "session" and check if "Session Support" says "enabled" or "disabled."
If you need further help determining if your host allows PHP sessions, you'll need to contact them directly.
Bookmarks