Linux finishes installing the redis extension. It is shown in PHPinfo, but not in php-m. And use the php command to execute a prompt that the redis class does not exist

clipboard.png

1.php


clipboard.png

clipboard.png

php -m

clipboard.png

neither.

the point is that I was running normally the day before. No changes have been made. also disappeared with the Swoole extension.

Baidu"s methods have no effect. Have any bosses ever encountered this kind of situation. Solve.

Php
Jun.17,2021
The php of

php-m is the php under bin. It is not necessarily the same as the php used by nginx.


first check whether the .ini file of php executed under the command line and the .ini file of php executed by Web are the same

then check whether the corresponding extension is introduced in the ini file

invalid Redis can try Redis


is solved upstairs, and 99% of the cases are: it is not the reason for parsing the same php file.

Menu