php 7.4 mysqli 指向错误路径

php 7.4 mysqli 指向错误路径

我最近在 Debian 上将 php 7.3 更新到了 php 7.4,但 apache 似乎将 mysqli 指向了较旧的路径。我该如何找出问题出在哪里?

错误 -

[Mon Apr 06 07:22:13.384517 2020] [mpm_prefork:notice] [pid 17446] AH00169: caught SIGTERM, shutting down
PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib/php/20180731/mysqli.so (/usr/lib/php/20180731/mysqli.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/mysqli.so.so (/usr/lib/php/20180731/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

我尝试检查它是否已安装 -

    php -m | grep mysqli
mysqli



php -i | grep extension_dir
extension_dir => /usr/lib/php/20190902 => /usr/lib/php/20190902

答案1

我自己解决了这个问题。不得不禁用 Apache PHP 7.3 模块并启用 PHP 7.4。有时,我们会忘记执行基本步骤。只是分享答案,所以如果有人遇到同样的问题,他们可以尝试以下方法 -

a2dismod php7.3
a2enmod php7.4

相关内容