Problem: How to fix session_start() error

Problem:
You get a session_start error and it references a si-contact-form.php file

The error is similar to this (the line numbers and directory may even be slightly different)
Warning: session_start() [function.session-start]: open(/tmp/sess_aa3rmj2iquntm19df3d2higua3, O_RDWR) failed: No such file or directory (2) in /wp-content/plugins/si-contact-form/si-contact-form.php on line 1795

Or the error is similar to this (the line numbers and directory may even be slightly different)
Warning: session_start() [function.session-start]: open(/tmp/sess_aaa16408141656d9755cf49548472883, O_RDWR) failed: Permission denied (13) in /wp-content/plugins/si-contact-form/si-contact-form.php on line 1810

Also, it may or may not be followed by these two other errors:
Warning: session_start() [function.session-start]: Cannot send session cookie – headers already sent

Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent

The first error is the cause, the other two are effects of the first error. There is nothing wrong with the plugin code. This plugin is just asking the PHP server to open a session to set a cookie. The problem is that PHP sessions are currently not working on your server and the cookie cannot be set. The PHP server is not allowing the session to start and the error is how you find out.

The error is telling you that it cannot open the required session temporary folder because the folder does not exist or that the permissions or ownership is incorrect. This is purely a server misconfiguration, not a program error with the plugin.

Solution:
Make a trouble ticket with your web host. Ask them to fix the broken PHP session feature of the web server. It will better help them resolve the problem if you include the error message and a URL to your page with the error on it. They can create the proper temporary folder needed for PHP sessions. If the folder is already there, they can check and make the necessary adjustments to the folder permissions or group ownership. Then the sessions will work as they should.

Do you need help?

Donations by PayPal:

If you find this free contact form program/plugin useful to you, please consider making a small donation to help contribute to further development. My time is very limited and I get dozens of support emails every day. If you are not able to donate, that is OK. Thanks for your kind support! - Mike Challis

Donations by cash or check:
Mike Challis
PO Box 819
Long Beach WA 98631

Comments are closed.