It's possible to use PHP sessions in a secure manner, as far as anything on the web is secure. Here's a brain dump of issues to watch out for though;
1. Shared web servers - anyone else on the server can read your session files if PHP is running as an Apache module (so the session files belong to the web user). They (probably) won't know the site the sessions apply to but you may still be putting sensitive info (like credit card details) somewhere for all to see. Using a custom session handler to store the sessions in a database is probably the best solution. You
might consider
MySQL HEAP tables if performance is an issue (assuming MySQL running on same machine as Apache).
2. XSS exploits and session hijacking - using JavaScript users can be fooled into giving away their active session_id. All someone needs to "hijack" a session is the unique session id. Research XSS and how to prevent it. Accept that session hijacking cannot be entirely prevented (using IP address for example is foiled by AOL, who assign a new client IP on more or less every page request) and double check "critical actions" a user can perform e.g. changing password - require the old password (which the session hijacker should not know). Displaying credit card infomation - do like Amazon and only display the last four digits. Etc.
3. Session IDs in URL (and hijacking) - if you're using session IDs in the URL (as opposed to a session cookie), make sure offsite links do not contain the session ID (or the remote site will be able to hijack) - PHP should take care of this. Also your visitors may give away the session ID in the referrer field - ideally pass off site links through a redirect page, to elimate the referrer (although, unfortunately, some browsers keep the last 3 pages viewed I believe - unsure of facts). Ideally, don't pass session ids in the URL - require users to accept a cookie if they need to "log in".
4. Use SSL (HTTPS) - a session ID can be "sniffed" between the client and your server. If it's an app with money involved, SSL is a requirement. Otherwise you have to live with the risk.
5. Don't use cookies for store sensitive information. Not really about sessions but I've seen people implement session-like behaviour using cookies. Cookie data, unlike sessions, gets stored on the client site. Apart from the "sniffing risk", a large majority of Windows users have little idea of security and may be "owned by haxor". Otherwise, cookies (aside from session cookie PHP creates for you) are generally meant for long term (i.e. between visits) data persistance (e.g. "Remember Me") rather than "active session" persistance.
Brain empty for the time being.
Bookmarks