-1

I have installed apache server, php and mysql in my remote system.(im not using xampp or wampp or any). I installed it separately. When I started working with codeigniter framework, it shows this error Call to undefined function mysqli_init() .I configured database in codeigniter and that is for sure.

Phil
  • 157,677
  • 23
  • 242
  • 245
mohammed yaser
  • 2,291
  • 2
  • 12
  • 16
  • if you come from php storm -> https://intellij-support.jetbrains.com/hc/en-us/community/posts/207033955-mysqli-connect-mysql-connect-error- or https://web.archive.org/web/20200805054537/https://intellij-support.jetbrains.com/hc/en-us/community/posts/207033955-mysqli-connect-mysql-connect-error- – Soner from The Ottoman Empire Nov 01 '20 at 10:39

1 Answers1

1

try this

Go to your php.ini and remove comment from ;extension=php_mysqli.dll:

extension=php_mysqli.dll

If its not working than install

Try installing  php5-mysqlnd

If you cannot do it by hosting restrictions then just move to mysql driver (wont need to change other configurations or queries in CodeIgniter or anything else...)

like this (at your config file)

$db['default']['dbdriver'] = 'mysql'; (you might have mysqli now)
Bhargav Chudasama
  • 6,928
  • 5
  • 21
  • 39