Home > Backend Development > PHP Tutorial > Problems with setting up multi-level directory sessions in PHP_PHP Tutorial

Problems with setting up multi-level directory sessions in PHP_PHP Tutorial

WBOY
Release: 2016-07-21 15:25:03
Original
846 people have browsed it

Find session.save_path in php.ini and set the value to session.save_path = '3;/tmp/session'; to enable the third-level directory to save the session. However, php will not automatically generate the directory structure. In this case, you can use mod_files.sh in the ext/session directory of the source code package to generate the directory

$ bash mod_files.sh /tmp/session 3

Generate After completing it, I found that the session still could not be generated. After struggling for a long time, I opened mod_files.bat and discovered the mystery. It turns out that I need to bring a parameter later, which corresponds to session.hash_bits_per_character in php.ini. This value defaults to 4, for development and production versions. The default configuration is 5, so use the following command to regenerate the directory

$ bash mod_files.sh /tmp/session 3 5

Finally you can log in.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324202.htmlTechArticleFind session.save_path in php.ini and set the value to session.save_path = '3;/tmp/session '; to open the third-level directory to save the session. However, php will not automatically generate the directory structure. At this time, you can...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template