Home > Article > Backend Development > What to do if php session_start fails
Solution to php session_start failure: First find and open "php.ini"; then set "session.serialize_handler" to php.
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!