Install phpredis extension.
**NOTE**: The phpize path must be replaced by the actual path in your environment.
**NOTE**: The php-config path must be replaced by the actual path in your environment.
Modify the following php.ini parameters:
extension = redis.so
session.save_handler = redis
session.save_path = “tcp://connection address of your ApsaraDB for Redis instance?auth=password of your ApsaraDB for Redis instance”
See the following figure:
Restart the Web service after setup.
Compile a PHP session generation page to verify whether the settings are saved to ApsaraDB for Redis.
The content of test.php is as follows:
php test.phpto parse the PHP page to ensure the settings are saved to ApsaraDB for Redis.
Thank you! We've received your feedback.