Page 1 of 1

Warning: session_start(): open

Posted: Tue Sep 09, 2003 6:27 am
by Khairul Alam
Warning: session_start(): open(/tmp\sess_46bbac00dab18999a67957a65c2455c1, O_RDWR) failed: No such file or directory (2) in c:\inetpub\wwwroot\test\session1.php on line 2

Warning: Unknown(): open(C:/inetpub/wwwroot/tmp\sess_46bbac00dab18999a67957a65c2455c1, 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 (N;C:/inetpub/wwwroot/tmp) in Unknown on line 0


Have you ever gotten that type of error ?
Could any one help me to solve this problem ?

For ur kind information.
I am using PHP-MySQL in Windows platform & IIS server.

-------- session1.php--------

Code: Select all

//---------- top of the page
<?php

session_start();

?>

<html>
<body>

<?php


if(!empty($_POST['loginid']))
{
	if(!session_is_registered('login'))
	{
	$login=$_POST['loginid'];
	session_register('login');
	print "Welcome " . $_SESSION['login'] . ". You are logged in.";

	}
}

?>

</body>
</html>
?>

Posted: Tue Sep 09, 2003 7:19 am
by twigletmac
I have moved this from the Advanced Theory and Design forum as it is a coding problem. Please read the forum descriptions before posting.

Here are a few threads in which the poster had the same problem as you and it was solved:
viewtopic.php?t=8168
viewtopic.php?t=10938
viewtopic.php?t=9241
viewtopic.php?t=8497

Mac

Posted: Tue Sep 09, 2003 10:38 am
by JAM
Short answer:
'C:/inetpub/wwwroot/tmp' (the directory) is probably missing. ;)

Posted: Tue Sep 09, 2003 1:10 pm
by delorian
Even more short answer:
'C:/tmp' (the directory) is missing for sure. ;)

I've got the same errors once. First try to create the c:/tmp dir and then the other dir.

Posted: Wed Sep 10, 2003 3:44 am
by twigletmac
Or, as shown in the links I posted, edit your php.ini so that you can have your session data saved to any folder you like, e.g. c:\php\session_stuff.

It doesn't have to go to the default location.

Mac

Posted: Wed Sep 10, 2003 4:06 am
by Khairul Alam
thanx all for ur reply

I fixed up my problem :lol: