I am getting these warnings. Can someone please help me how I can solve these problems? Warning: session_start() [function.session-start]: open(../../sess_e6c892857130433aebff3c32122517b1, O_RDWR) failed: No such file or directory (2) in /../session.inc on line 28 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /../session.inc:28) in /../session.inc on line 28
I think you have wrong permissions for "../../" folder, it should be writable for user running httpd.
Yes, check your php.ini file to make sure the path to the session folder is set correctly. If you can't do this ask your systems admin and they will do it for you.
No, but the error that is being produced by the session is sending Error HTML back to the client, so its creating temporary headers, which causes the headers sent later to error.
after much contemplation, and trying to replicate the error.... <? // dir could be /home/user/session // keep it OUT of webroot ini_set("session.save_path", "/path/to/dir/with/chmod/777/perms"); ?> PHP: Right at the top of the script, before any code
+1 This option makes far more sense than editing each of your PHP scripts when really it's just a permissions setting on the php.ini file keeping Apache, etc. from being able to write to the /tmp directory or whichever directory your sessions are stored in. This can easily be fixed by logging into your server via FTP with the root account and pw and then CHMOD your /tmp folder to 755 or 777 (only if 755 don't work), or you could use Putty which is a free SSH Program and you can do it all via command line by typing into the console like so: "chmod 0755 /tmp" (or "chmod 0777 /tmp") Without the quotes of course. What this will do is set the permissions on your /tmp folder or whatever so the server is able to write to it and store sessions and all properly. Fix it the right way. Don't rewrite your scripts... Just fix your php.ini !