Session configuration for phpcms V9

Source: Internet
Author: User

Today, when I used phpcms V9 to add a new module, I found a strange problem: in the same module operation, sessions between methods (pages) do not work, that is, the $ _ Session array cannot be passed. I thought it was because the server didn't enable the session function. I tried it for various reasons, but I still couldn't. I finally found out why it was the system itself. When I created an operation class, I introduced a system file on the top, for example:

Defined ('in _ phpcms ') or exit ('no permission resources. '); // pc_base: load_app_class ('admin', 'admin', 0);/* $ session_storage = 'session _'. pc_base: load_config ('system', 'session _ store'); pc_base: load_sys_class ($ session_storage); */class index {function _ construct () {.............

Just comment them out.

Phpcms V9 logon uses session, which can be saved in two ways: database storage and file storage. The default mode is database storage. Sometimes the database does not work in this way. You can go to \ caches \ configs \ system. modify the storage method of the sesion in PHP. // configure 'session _ store' => 'mysql' for the session, and change it to // configure 'session _ store' => 'files' for the session ', it cannot be blank. Otherwise, the logon will not be successful.

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.