Home  >  Article  >  Backend Development  >  What to do if php session_start fails

What to do if php session_start fails

藏色散人
藏色散人Original
2021-07-22 10:59:452657browse

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

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

3. Solution:

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

session.serialize_handler=php

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!

Statement:
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