Welcome Guest, Not a member yet? Register   Sign In
Call to undefined function mysqli_init()
#1

Hello, I have a new installation on linux mint with apache2, mysql, php7 and CodeIgniter3.0.4 - latest
when I want to access db, there is this error coming. Then I controlled phpini() but there is no mysqli
only mysqlnd (native driver) ... is there anybody who is developing with php7 and knows how to install
php7 with mysqli ? Sorry my bad english, this is not my native language.

Error:


An uncaught Exception was encountered

Type: Error

Message: Call to undefined function mysqli_init()

Filename: /var/www/html/codeigniter/sys304/database/drivers/mysqli/mysqli_driver.php

Line Number: 136

Backtrace:

File: /var/www/html/codeigniter/app304/models/Welcome.php
Line: 12
Function: database

File: /var/www/html/codeigniter/app304/controllers/Mfw.php
Line: 24
Function: model

File: /var/www/html/codeigniter/index.php
Line: 292
Function: require_once
Reply
#2

sudo add-apt-repository ppa:ondrej/php-7.0
sudo apt-get update
sudo apt-get install \
php7.0 \php7.0-cli \
php7.0-cgi \
php7.0-fpm \
php7.0-curl \
php7.0-dbg \
php7.0-gd \
php7.0-dev \
php7.0-json \
php7.0-mcrypt \
php7.0-mysql \
php7.0-readline \
php7.0-xmlrpc

I found the answer to my installing problem, thanks Google ;-)
=:}
Reply
#3

Google is your Friend.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4
Smile 

Thank you man this helped me Smile
Reply
#5

Yep I had a similar problem under Windows 10,
I added all the Apache modules I needed and completely forgot about the php.ini file for PHP 7.1.3.

That will teach me to rush my install lol

Thanks for the help.
Reply
#6

(01-29-2016, 12:56 PM)noorfahad Wrote: Hello, I have a new installation on online Webhosting

i change php version and also set time format when i remove time format so i can access but after some time it's show time out
and when i add
in index.php
if( ! ini_get('date.timezone') )
 {
   date_default_timezone_set('GMT');
}
so show me this 
Error:


Severity: Error
Message: Call to undefined function mysqli_init()
Filename: mysqli/mysqli_driver.php
Line Number: 135
Backtrace:
Reply




Theme © iAndrew 2016 - Forum software by © MyBB