January 30th, 2013, 11:19 PM
Question about php session error
I have inherited a new website which is on a cpanel server with php 5.3.21
Now the website seems to have a custom CMS written in php however I just moved the site to this new server of mine and now I am getting the following error messages on all pages instead of the content loading
Warning: session_start() [function.session-start]: open(/tmp/sess_f4211b90ee82bfa5ff35de86b824904d, O_RDWR) failed: Permission denied (13) in /home/*****/public_html/subindex.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/*****/public_html/subindex
Now I ssh'ed into my server and looked at the php.ini file that is in usr/local/lib/php and session.save_path = /tmp
Which I think is what it needs to be I also within cpanel went to the file manager and then went up one directory to see the /tmp folder and I changed the permission from 0755 to 0777 on the folder
but still that did not fix it
I tried searching cpanel forums but see a few people asking about this with no real answer
Hoping someone here might have a suggestion aside from rebuilding the website
January 31st, 2013, 04:19 AM
how about posting your code?
one error regarding headers already sent is because you are outputting something to the screen
January 31st, 2013, 06:47 PM
Make sure the files inside /tmp are writable too. Try a chmod 777 on /tmp/sess*
The header error is probably caused by the first error.
Is /tmp on the same filesystem as your web root?
What do you get if you do a "ls -la" in the /tmp directory?