skip to Main Content

I have installed php7.2, apache and mysql.
When I copied codeigniter folder in my var/www/html it runs but give one error as

A PHP Error was encountered

Severity: Core Warning

Message: PHP Startup: Unable to load dynamic library ‘php_mysqli’
(tried: /usr/lib/php/20170718/php_mysqli
(/usr/lib/php/20170718/php_mysqli: cannot open shared object file: No
such file or directory), /usr/lib/php/20170718/php_mysqli.so
(/usr/lib/php/20170718/php_mysqli.so: cannot open shared object file:
No such file or directory))

Filename: Unknown

Line Number: 0

Backtrace:

I search for the same and tried with different solution as updating php.ini file but still getting the same error.

I am using Ubuntu 18.04.1 LTS OS

Your help would be appreciated.
Thanks.

2

Answers


  1. You should open php.ini file and check if the line:

     extension=mysqli.so 
    

    presented and not commented with # sign

    Login or Signup to reply.
  2. Install php extension for mysql.

    use this command

    sudo apt-get install php-mysql
    

    After installation restart apache with this command

    sudo service apache2 restart
    

    update

    If sudo apt-get install php-mysql

    not work for you then you should use

    sudo apt-get install php7.2-mysql
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search