PHP Session error


I’ve got error message when session_start();

Warning: session_start() [function.session-start]: open(/tmp/sess_7b57a61cbed03ceb69deb8d23ff876c3, O_RDWR) failed: Permission denied (13) in /home/.txinkie/myusername/ on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/.txinkie/myusername/ in /home/.txinkie/myusername/ on line 2

So, i create folder /home/.txinkie/myusername/tmp than chmod t0 777
then upload .htaccess file with a line
php_value session.save_path /home/.txinkie/myusername/tmp to /home/.txinkie/myusername/

but the error message still not resolve. Please help me.

A little over a year ago, poster urbanroute shared a workaround that worked for him with a similar problem.

From looking at that post, and looking at your post, I see one difference. While it may not appear to be significant, he created the “tmp” directory for saving the session info within his web accessible space, while you have (obstensibly for security reasons) created it outside your web accessible space).

That got me to thinking, and I am wondering if something that is now different in the DreamHost configuration from the way it was then might be affecting this:

  1. Do you have “Extra Web Security” enabled in the Control Panel for your Domain?

  2. Do you have “Enhanced Security” enabled for your user (the user under which PHP-CGI is running)?

You might check those settings, and see if changing either, or both, of them makes a difference.

Additionally, I suggest a good “test case” would be to do a “test configuration” exactly duplicating what urbanroute reported to work, by placing the “tmp” directory inside your “yourdomain.tld” directory.

Those steps ought to at least help narrow the possibilities as to what might be causing the problem.


In addition to rlparker’s advice, you may wish to setup your own Custom PHP.ini. Nine times out of ten, you aren’t going to be able to set PHP parameters/settings through your .htaccess file, and thus using the above mentioned Custom PHP.ini file you’ll be able to set your own ‘tmp’ directory, along with other potentially useful settings via the php.ini file. :wink:

Chips N Cheese - Custom PHP installs and the like!