Notoriouswow Posted January 5, 2010 Share Posted January 5, 2010 I have a PHP script for my website, it requires information from my database but i keep getting this error whenever I try to use it. Warning: session_start() [function.session-start]: open(..\Server\tmp\sess_a2ad2e8373eb70d668f1af9e465c7e14, O_RDWR) failed: No such file or directory (2) in C:\Server\Website\htdocs\avs\index.php on line 25 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:Server\Website\htdocs\avs\index.php:25) in C:\Server\Website\htdocs\avs\index.php on line 25 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Server\Website\htdocs\avs\index.php:25) in C:\Server\Website\htdocs\avs\index.php on line 25 I've Tried Modifying The Script But No Luck, Heres The Script Im Working With.... Please Help <?php define("LOGON_HOST","localhost"); define("LOGON_USER","root"); define("LOGON_PASS","ascent"); define("LOGON_DB","logon"); define("ENCRYPT_PASSWORDS",false); define("MYSQL_HOST","localhost"); define("MYSQL_USER","root"); define("MYSQL_PASS","ascent"); define("MYSQL_DB","avs_voting"); define("MAIL_SUBJECT","Thanks For Voting!"); define("MAIL_BODY","Thank you for voting for our server. Here is your reward!"); define("RPPV",3); session_start(); if(!$_SESSION['vcp']['authenticated'] && $_GET['act'] != "vote") /Line 25 { include("pages/login.php"); new Login(); die; } switch($_GET['act']) { default: include("pages/overview.php"); new Overview(); break; case "rewards": include("pages/rewards.php"); new Rewards(); break; case "spend": include("pages/spend.php"); new Spend(); break; case "vote": include("pages/vote.php"); new Vote(); break; } ?> Link to comment https://forums.phpfreaks.com/topic/187196-warning-session_start/ Share on other sites More sharing options...
trq Posted January 5, 2010 Share Posted January 5, 2010 It would appear your server process's user does not have permissions to write to the session.save_path data directory. Have you made any modifications to this setting via php.ini or other directive? Link to comment https://forums.phpfreaks.com/topic/187196-warning-session_start/#findComment-988522 Share on other sites More sharing options...
Notoriouswow Posted January 5, 2010 Author Share Posted January 5, 2010 It would appear your server process's user does not have permissions to write to the session.save_path data directory. Have you made any modifications to this setting via php.ini or other directive? No i haven't modified that file what so ever. What bothers me is that it worked on my former site but it doesn't work for this one. Would you like the scripts in the directories.... /pages/login.php ect.? Link to comment https://forums.phpfreaks.com/topic/187196-warning-session_start/#findComment-988528 Share on other sites More sharing options...
corbin Posted January 5, 2010 Share Posted January 5, 2010 Does the directory C:\Server\Website\htdocs\Server\tmp\ Exist? That's a kind of strange session save path. Perhaps you meant to set it to \Server\tmp instead of ..\Server\Tmp? Link to comment https://forums.phpfreaks.com/topic/187196-warning-session_start/#findComment-988532 Share on other sites More sharing options...
Notoriouswow Posted January 5, 2010 Author Share Posted January 5, 2010 Does the directory C:\Server\Website\htdocs\Server\tmp\ Exist? That's a kind of strange session save path. Perhaps you meant to set it to \Server\tmp instead of ..\Server\Tmp? Yes it does exist, i changed the names to make it simpler on myself, everything else works fine so it cant be the directory. Link to comment https://forums.phpfreaks.com/topic/187196-warning-session_start/#findComment-988537 Share on other sites More sharing options...
trq Posted January 5, 2010 Share Posted January 5, 2010 everything else works fine so it cant be the directory. Read the error message. It clearly states 'No such file or directory' Try using an absolute path to the directory. Link to comment https://forums.phpfreaks.com/topic/187196-warning-session_start/#findComment-988562 Share on other sites More sharing options...
Notoriouswow Posted January 5, 2010 Author Share Posted January 5, 2010 everything else works fine so it cant be the directory. Read the error message. It clearly states 'No such file or directory' Try using an absolute path to the directory. I made everything an absolute path as you suggested, and it didn't do much[ just made the error page load faster. Link to comment https://forums.phpfreaks.com/topic/187196-warning-session_start/#findComment-988600 Share on other sites More sharing options...
trq Posted January 5, 2010 Share Posted January 5, 2010 So... where are you setting the session.save_path? I asked in my first reply if it had been modified and you said it had not. Link to comment https://forums.phpfreaks.com/topic/187196-warning-session_start/#findComment-988606 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.