vinoindiamca Posted January 3, 2009 Share Posted January 3, 2009 Hi, I have session problem in my code <?php session_start(); if($_SESSION["username"]!="") { header("location: welcome.php"); } ?> Here session_start() gives an error like Warning: session_start() [function.session-start]: open(C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\php\session\sess_uvu8ver7m73v61ejvbit5jho87, O_RDWR) failed: No such file or directory (2) in C:\Inetpub\wwwroot\Ajax\ajax_datagrid\login.php on line 2 Please give me the solution to change any codes in PHP.ini file Quote Link to comment https://forums.phpfreaks.com/topic/139315-session_start-function-not-working-in-windows-iis/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 3, 2009 Share Posted January 3, 2009 No such file or directory Does any one read error messages??? C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\php\session\ does not exist. You either need to create that directory or you need to change the session.save_path setting to point to a directory that does exist. Quote Link to comment https://forums.phpfreaks.com/topic/139315-session_start-function-not-working-in-windows-iis/#findComment-728655 Share on other sites More sharing options...
BioBob Posted January 29, 2009 Share Posted January 29, 2009 Thats a short answer. change your php.ini session.save_path = 'c:\php\sessiontemp\' and go CREATE that folder. Also, since youre in the IIS section, any changes to php.ini you'll need to restart IIS. Start > Run > iisreset. You may also have your box running in lockdown mode, and by that I mean if you create a folder, and specify it, your folder will need to have the right windows permissions for the internet guest user account to have READ AND WRITE access to this folder. the session temp directory usually needs the user group 'IUSR_(machine_name)' to have WRITE permissions to that folder. THen it should work. Quote Link to comment https://forums.phpfreaks.com/topic/139315-session_start-function-not-working-in-windows-iis/#findComment-749574 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.