Home > Backend Development > PHP Tutorial > Problem setting up multi-level directory sessions in php

Problem setting up multi-level directory sessions in php

高洛峰
Release: 2023-03-01 11:52:02
Original
993 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. At this time, 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

After the generation is completed, it is found that the session still cannot be generated. After struggling for a long time, I discovered the mystery when I opened mod_files.bat. 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, and the default configuration of the development and production versions is 5, so I use The following command regenerates the directory

$ bash mod_files.sh /tmp/session 3 5

Finally you can log in.

Related labels:
php
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