FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Session directory permissions issue





akshar
http://akshar.co.in/blog is my site and it has suddenly stopped working in what looks like a direcotry permissions issue.
Will you please help me resolve it ?
sonam
Did you change path for tmp folder? It' looking like you did it, not like folder permision. I think this is not allowed by wordpress, maybe with php_ini but I am not sure. Wait for someone who knows more about wordpress.

Sonam
shkhanal
Hi,

I installed the MWQ 1.5 - a small PHP quiz application and it was working fine. I set up lots of questions and answers and I was very happy.

I don't know what happened, today when just visited my quiz, it is displaying nonsense error message

Quote:
Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/home/watersou/tmp) is not within the allowed path(s): (/home/shkhanal:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/shkhanal/public_html/psexam.com/quiz/index.php on line 7

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /home/shkhanal/public_html/psexam.com/quiz/index.php on line 7


I don't know if there exists any /home/watersou/tmp folder on frihost hosting account. I checked from file manager.

Then I deleted all the files of quiz from file manager and again uploaded the php files, since questions were there on database. Now, when I run the back-end runs OK but the front end again displays the same message:

Quote:
Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/home/watersou/tmp) is not within the allowed path(s): (/home/shkhanal:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/shkhanal/public_html/psexam.com/quiz/index.php on line 7

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /home/shkhanal/public_html/psexam.com/quiz/index.php on line 7


I guess the script is being unable to session_start. What can I do for it?

I could not figure it out what happened. Please somebody help! Its urgent.
Bondings
Could it be that the file is changed/not there anymore first of all? I couldn't find the index.php file in question, so I can't give you a complete answer.

However, the reason why the script fails is that it tries to access a tmp directory from another user! This thing is supposed to be blocked for security reasons. There are a lot of tmp directories that you can use, but not those from other users.

So I would check the script how it could possible refer to the user watersou his tmp directory and replace it with your own or /var/tmp or /home/tmp.
joostvane
I have the same problem, with another application. I could use the application perfectly until yesterday.

I think its a server fault.
Bondings
I'm sorry, I thought this was due to the scripts, but this was actually a server issue.

Somehow the server started to use the tmp directory of one user as the directory to store the sessions of everyone. And since that directory is restricted for everyone else, it didn't work anymore.

Anyway, I changed the directory to the /tmp directory. Please check if everything works fine now.
shkhanal
Oh my god. Then its ok.

Can I revert back to my index.php page to original state?
Bondings
shkhanal wrote:
Oh my god. Then its ok.

Can I revert back to my index.php page to original state?

Yes please, and test if everything is working fine again.
shkhanal
Yes it worked perfectly now. I thought some problem in script and modified a lot of things without success. Anyway, now after your fix, its great.

Thank you Bondings for your effort!
Related topics
[ERROR] Windows cannot access...
Joomla (Sessions Unwritable)
Relatively Secure Session Management System for PHP
Joomla Extensions problems
proper files/folders permissions for wordpress on frihost
PHP safety?
How do I set-up Mambo for my new site here?
Debian or ubuntu?
The Code You Need
Joomla /tmp/ file.
Can you have upload scripts on frihost sites?
oscommerce help
problem with python's os.mkdir in cgi test
Ubuntu Server Read Only
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.