Home > Backend Development > PHP Problem > What to do if php session_start fails

What to do if php session_start fails

藏色散人
Release: 2023-03-11 18:36:01
Original
2675 people have browsed it

Solution to php session_start failure: First find and open "php.ini"; then set "session.serialize_handler" to php.

What to do if php session_start fails

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

What should I do if php session_start fails?

session_start() failed to start

PHP Session failed to start

1. Error message:

session_start(): Cannot find serialization handler ‘redis’ - session startup failed
Copy after login

2. Error reason:

The reason for this error is that the session serialization handle options during PHP configuration include (php_serialize, php, php_binary, wddx) without the redis option, and when I set it, it was set to redis, so it caused an error. There is an error. For the specific reason, you can check the official documentation of php and the official explanation of php. Please click

. The error configuration is as follows:

session.serialize_handler=redis
Copy after login

3. Solution:

php.ini The session.serialize_handler can be set to php. The correct configuration is as follows:

session.serialize_handler=php
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if php session_start fails. For more information, please follow other related articles on the PHP Chinese website!

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