Page 1 of 1

Session / Header errors after enabling PHPsuexec

Posted: Mon Nov 22, 2010 3:26 pm
by Keithb
I've never been a fan of 777 permissions so I enabled PHPsuexec in WHM on cpanel server.  After changing directories to 755, I now get:

Warning: session_start() [function.session-start]: open(/tmp/sess_fd18fea834f6d44d41c0e65a5c0e3d43, O_RDWR) failed: Permission denied (13) in /home/******/public_html/include.php on line 34

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/******/public_html/include.php:34) in /home/*******/public_html/include.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /home/******/public_html/include.php:34) in /home/*******/public_html/index.php on line 262

And in the admin interface everything is just laid on top of each other.  Any ideas on that?  I'd rather run phpsuexec if possible due to security reasons.  I'm not comfortable leaving 777 out there.

Re: Session / Header errors after enabling PHPsuexec

Posted: Mon Nov 22, 2010 3:31 pm
by calguy1000
Well the error is self describing... your user account doesn't have permission to write to the /tmp directory, where the sessions are saved.

Change the session save path to a location where your user account can write.

Re: Session / Header errors after enabling PHPsuexec

Posted: Mon Nov 22, 2010 3:57 pm
by Keithb
Thanks.  Any ideas how to do this through .htaccess?  I prefer not to get to the root level in php.ini if possible.