I keep having trouble with Session_Start(); here are the error messages

Warning: session_start() [function.session-start]: open(/tmp\sess_c5bb336f66b5362b9d0a5ea3b91d1bf5, O_RDWR) failed: No such file or directory (2) in C:\Program Files\nusphere\phpED\projects\noname2.php on line 1

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Program Files\nusphere\phpED\projects\noname2.php:1) in C:\Program Files\nusphere\phpED\projects\noname2.php on line 1

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\nusphere\phpED\projects\noname2.php:1) in C:\Program Files\nusphere\phpED\projects\noname2.php on line 1

here are the first few lines:

<?php session_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

im also getting other messages that have nothing to do with my code. here they are:

Warning: Unknown(): open(/tmp\sess_c5bb336f66b5362b9d0a5ea3b91d1bf5, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

as you can tell im sorta new at this so if you could help out that would great! thanks!

    here it is, it worked for me after i moved the session_start line around

      faint....
      you just need make a directory..... " c:\tmp ".....
      i think it will work!.......

        a month later

        Creating a c:\tmp folder does work but not really a good solution ... because every visitor to the site would need to create that folder in order to avoid this error.

        Try changing the session.save_path in php.ini to session.save_path = c:\windows\temp.

        ... and don't forget to restart the webserver and php after you alter php.ini as the change will not take affect until after the service is restarted.

          Originally posted by ElectricMessiah
          Try changing the session.save_path in php.ini to session.save_path = c:\windows\temp.

          pretty sure that is what shinfer was referring to, surely he wasn't meaning that each user would have to go through the trouble of doing that, you need only do this on the server

            Write a Reply...