The problem is that the redis class cannot be captured in the message
However, I have installed redis and used it in PHP code, but when I execute PHP jifen.php in Linux system, I report that redis class cannot be found.
Solution:
First, determine if there are two PHP in your system.
find/-name php
Then find your current PHP Directory:
Use phpinfo () in the PHP file; Method, you can access it
My PHP files are at /www/server/PHP/73/
Modify the system environment file:/etc/profile
vi /etc/profile
Write the PHP environment address to the end of the configuration file
The PHP runtime files are inside the bin directory, so mine is: /www/server/php/73/bin/
export PATH=$PATH:your PHP address
Save, exit, and then run:
source /etc/profile
Restart the PHP file to use PHP jifen.php