centos6.4 php Session loss problem

Source: Internet
Author: User
Tags php session

System environment: CentOS 6.4 + Nginx + PHP (PHP-FPM)

PHP is using the default installation (yum install PHP), and later found that using the session error, always get the session value.

error_reporting (0); session_start (); $_session[' count ']++;echo $_session[' count ']; The output here is always: 1,


Later by looking at the configuration found in/etc/php.ini, Session.save_path =/var/lib/php/session, entered into this directory found that no file creation, it means that this is a directory permissions problem, only need to change the directory permissions to resolve.

The most violent way is

chmod 777/var/lib/php/session


This article is from the "happy Programming _ Endless" blog, please be sure to keep this source http://happyliu.blog.51cto.com/501986/1726733

centos6.4 php Session loss problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.