Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am having a slight problem...I have a server that I set up using AppServ 2.5.10, running Apache 2.2.8 and PHP 5.2.6. This is running on Windows Server 2008R2.

The problem is in order for the sessions to work, I have to be logged into the server. Meaning, my user on the server has to be logged in and I have to have an active session (logged into) on the site. If one of those is not true, the website gives the following error on any page that has session_start()

Warning: session_start() [function.session-start]: open(C:/Users/MARKR_~1/AppData/Local/Temp/2\sess_a35eddd147642009ba2e4f2364aaacff, O_RDWR) failed: No such file or directory (2) in C:\AppServ\www\ITOPS\Contacts\admin\add\addContact.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\ITOPS\Contacts\admin\add\addContact.php:2) in C:\AppServ\www\ITOPS\Contacts\admin\add\addContact.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\ITOPS\Contacts\admin\add\addContact.php:2) in C:\AppServ\www\ITOPS\Contacts\admin\add\addContact.php on line 4

I tried doing what was suggested in this post:

Store session files in different directories in PHP

But I couldn't get it to create a session file in the directory I specified, so it gave the same error.

I have the same setup, except running Server 2003, and this problem doesn't exist. It was installed the same way and same version of Apache/PHP.

Any ideas as to what I'm doing wrong?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Sounds like you are just having permissions issues - instead of going the .htaccess route as the last question/answer suggested - find the session save path in your php.ini, & set it to some path that is NOT in a user directory [ /tmp ??] - make sure that directory has write permissions by whatever the webserver is running as .... be sure to stop/start apache.

share|improve this answer
    
Thank you very much, that solved it. –  navalhawkeye Aug 8 '11 at 14:29
    
Your welcome. Glad to help. –  Sean Kimball Aug 8 '11 at 16:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.