猿问

在 Ubuntu CI 应用程序抛出错误中升级到 PHP 7.4.1。为什么?

刚刚升级到 PHP 7.4.1,然后是:https ://dev.to/pushkaranand/upgrading-to-php-7-4-26dg


升级后,


Code-igniter 应用程序抛出错误,例如:


Type: Error


Message: Call to undefined function mysqli_init()


Filename: /var/www/html/CI_PROJECT/system/database/drivers/mysqli/mysqli_driver.php

试过:通过取消注释php.ini(/etc/php/7.4/apache2/php.ini)中的以下行:


extension=mysqli 

extension=/path/to/extension/mysqli.so

mysqli.allow_local_infile = On 

然后,做了


systemctl restart apache2

请用适当的解决方案指导我。


MMTTMM
浏览 93回答 1
1回答

月关宝盒

尝试这个 :sudo apt-get install php7.4-mysql然后,在 Router.php 文件中/var/www/html/CI_PROJECT/application/third_party/MX/Router.php          // if (strpos($class, $suffix) === FALSE) if( $suffix && strpos($class, $suffix) === FALSE)并在 Modules.php 文件中/var/www/html/CI_PROJECT/vv_project/application/third_party/MX/Modules.php// (is_array($module)) ? list($module, $params) = each($module) : $params = NULL;   (is_array($module)) ? list($module, $params) = [key($module), current($module)] : $params = NULL;
随时随地看视频慕课网APP
我要回答