2

I have looked around on the issue - but it seems that all I can find about it is people who are having the problem connecting to a local database or something (not really sure). I am having the problem on my website (any time I make an ajax call to a file that has a session_start())

Anyways, this is the error message I am getting:

Warning: session_start() [function.session-start]: open(/usr/local/apache/bin/httpd/sess_5840483107c1db9753c32214723b64a6, O_RDWR) failed: Not a directory (20) in /data/in/r/reiconsultants/www/employee/user_page_login.php on line 3

Warning: Unknown(): open(/usr/local/apache/bin/httpd/sess_5840483107c1db9753c32214723b64a6, O_RDWR) failed: Not a directory (20) 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 (/usr/local/apache/bin/httpd) in Unknown on line 0

I haven't touched the code in a while - and I can be quite sure that no one else has either, so I am not sure why the error is occurring. I read a bunch about people going in and setting the php.ini file, but I have never had to do that before - and can't even find the file.

Like I said - the error is occurring on my company website, not when trying to connect to a local database.

The error just popped up today - I got flooded with emails about it, and it is on more than one web page being hosted on the server - all the pages I have that include a session_start() at the top have the issue.

Could it be a server side issue that I can't fix? or what...

sorry if I am not descriptive enough - I have absolutely no idea what is going on, and therefore don't know what to say. Just ask me for any clarification you need.

Thanks! Paul

2
  • If you are on a shared hosting, as it seems you are, you will probably need to contact your hosting provider, as that path will surely be out of your reach. Commented Feb 7, 2011 at 20:57
  • To find location of php.ini run <?php phpinfo() Commented Feb 7, 2011 at 20:57

3 Answers 3

2

The error is indicating that /usr/local/apache/bin/httpd/ is set as your folder to save session data in. Does that folder exist and is writable by the user Apache is running as? Does the Linux server have any other security measures like SELinux running that might be stopping writing to that directory?

Sign up to request clarification or add additional context in comments.

5 Comments

As far as I can tell, that directory isn't on the server at all...i do not know if it ever was
Then you either need to create it, or modify the php.ini config file to point to a folder that exists and is writable.
oh. where is the php.ini file located? and do I need to create a text file or anything in the folder that I change it to, or do I just need an empty directory?
Create a PHP file with phpinfo(); as it's sole command. Access that file from a browser and it will have lots of info, including the location of the active php.ini file. It just needs an empty directory; the PHP engine will put the appropriate files in it.
Awesome! got it fixed. I tried what you said - and the file wasnt there, so I called the host and they now have a NEW WEBSITE, with a control panel, that had the session path set to null....so I just had to go in and change that :)
1

Did you verify that the current setting of session.save_path is correct? Is /usr/local/apache/bin/httpd correct folder for saving session data?

Try set session.save_path = "/tmp" in you php.ini to ensure that problem is in folder.

Comments

0

you can also change the session path at run time: string session_save_path([string $path])

2 Comments

hmm. What would I want to change it to? to a file?
@user No, to a folder; the save_path parameter is the folder that's used to store all session information by the PHP engine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.