Answer the question
In order to leave comments, you need to log in
Session_start and Permission denied (13)?
Hello, I have a problem with the server:
Message: Zend_Session::start() - /home/sky/site/public_html/library/Zend/Session.php(Line:469): Error #2 session_start() [function.session-start]: open(/tmp/sess_hks4rn1aagba1j7pfi5gltje12, O_RDWR) failed: Permission denied (13) Array /home/sky/site/public_html/library/Zend/Session.php(Line:479): Error #2 session_write_close() [function.session-write-close]: open(/tmp/sess_hks4rn1aagba1j7pfi5gltje12, O_RDWR) failed: Permission denied (13) Array /home/sky/site/public_html/library/Zend/Session.php(Line:479): Error #2 session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp)
Answer the question
In order to leave comments, you need to log in
registered in the pool config and site settings
fastcgi_pass unix:/var/run/php-fpm/sky.sock; instead
of fastcgi_pass 127.0.0.1:9000;
and the problem is gone
by the way, access rights 777 on /tmp is an error that can lead to hard-to-diagnose jambs. Correct rights: 1777
Remove save_path, it saves it in tmp by default, and check if you corrected that php.ini. Personally, I have 4 of them, separately for Apache, cli, fpm (/etc/php5/fpm/php.ini) and cgi.
1. Don't use /tmp to store sessions. It is better to create a directory in /var. Is that what you don't like about the standard /var/lib/sessions?
2. You still need to find out under which user the script is running. Option:
assign this user as the owner of the directory for sessions and give him the right to write. If there are many of these, then drive them into one group and give it the right to write.
3. Check SELinux - disable for testing.
$info = posix_getpwuid(posix_getuid());
$login = $info['name'];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question