PHP 8.3 装 redis 6.0 扩展报 module API 版本不一致怎么降级

陆零云 36 0
现象 服务器把 PHP 从 8.1 升到 8.3 后,FPM 启动日志出现 PHP Warning: PHP Startup: redis: Unable to initialize module,Module compiled with module API=20220829, PHP compiled with module API=20230831。php -m 里没有 redis,业务连接缓存时直接报 Class "Redis" not found...

PHP 8.3 调用 mb_strlen 报未定义函数 mbstring 扩展怎么装

陆零云 31 0
现象 新服务器部署 Laravel 项目,访问首页直接 500,日志里是 Call to undefined function mb_strlen(),执行 composer install 也提示 requires ext-mbstring。php -m 的输出里确实找不到 mbstring,但 apt 显示相关包已经装过。 原因 mbstring 是独立扩展,PHP 主包不带。提示装过包,常见是装到了另一个 PHP 版本上,比如系统同时存在 8.1 和...