Reputation: 47
Just upgraded to PHP 7.4.1 followed by : https://dev.to/pushkaranand/upgrading-to-php-7-4-26dg
After upgrade,
Code-igniter application throwing error like :
Type: Error
Message: Call to undefined function mysqli_init()
Filename: /var/www/html/CI_PROJECT/system/database/drivers/mysqli/mysqli_driver.php
Tried : By uncommentating below line in php.ini (/etc/php/7.4/apache2/php.ini):
extension=mysqli
extension=/path/to/extension/mysqli.so
mysqli.allow_local_infile = On
Then, did
systemctl restart apache2
Please guide me with appropriate solution.
Upvotes: 1
Views: 759
Reputation: 46
Try This :
sudo apt-get install php7.4-mysql
Then, in Router.php file
/var/www/html/CI_PROJECT/application/third_party/MX/Router.php
// if (strpos($class, $suffix) === FALSE)
if( $suffix && strpos($class, $suffix) === FALSE)
And in Modules.php File
/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;
Upvotes: 3