Home > Backend Development > PHP Tutorial > redis添加密码后,存储不了session

redis添加密码后,存储不了session

WBOY
Release: 2016-06-23 13:29:36
Original
1295 people have browsed it


ini_set('session.save_handler', 'redis');ini_set('session.save_path', 'tcp://127.0.0.1:6379?auth=test');session_start();$_SESSION['sessionid'] = 'Hello world!';
Copy after login


以上代码,在redis设置密码后,执行完在redis里没发现生成的session数据;如果把redis不设置密码却又可以成功。哪位大侠帮忙看看,是什么问题


回复讨论(解决方案)

打开调试后报

Warning: Unknown: Failed to write session data (redis). Please verify that the current setting of session.save_path is correct (tcp://127.0.0.1:6379?auth=test) in Unknown on line 0
Copy after login

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