Recent Topics

Couldn't fetch mysqli() in AdminConfig.php during installation

  • I cannot complete Bagisto installation due to a MySQL error. Any help will be very appreciated.
    System information:

    • Ubuntu 18.04 LTS
    • nginx: 1.14.0
    • PHP 7.2.19
    • MariaDB 10.3.17
    • NodeJS 10.16.3

    Error message:

    [error] 24308#24308: *177 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /home/user/bagisto/public/installer/AdminConfig.php on line 86
    PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /home/user/bagisto/public/installer/AdminConfig.php on line 92
    PHP message: PHP Warning:  main(): Couldn't fetch mysqli in /home/user/bagisto/public/installer/AdminConfig.php on line 95
    PHP message: PHP Warning:  mysqli::close(): Couldn't fetch mysqli in /home/user/bagisto/public/installer/AdminConfig.php on line 98" while reading response header from upstream, client:, server: _, request: "POST /installer//AdminConfig.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "localhost", referrer: "http://localhost/installer/"

    Steps to reproduce:

    1. Download Bagisto(v0.16) from GitHub
    2. Follow installation instructions
    3. Hit "Continue" button in Admin Details form
    4. Expect following error
      First message
      Second message

    Credentials are 100% correct since I completed previous step (Migration and Seeding).
    Path to the public folder in error message text was modified as well as the second picture, for privacy reasons.

  • Hi @VorobiovM

    On the basis of your attach screenshot, your installation has completed only admin details are not set & it could not established connection with database. Kindly make sure that you have entered all details correctly.


  • @rahul i have the same problem but i receive this error first....Warning: mysqli::close(): Couldn't fetch mysqli in C:\xampp\htdocs\bagisto\public\installer\index.php on line 107

  • Hi @vbanti
    Please check the mysql credentails are correct in .env file?

  • @Vaishali-Agarwal I am getting the same issue. Have fixed the emv file and keep testing alternatives with no success.

  • Hi @bagger

    login the mysql with command line and then run the command in CLI

    1. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Current-Root-Password';
      replace 'Current-Root-Password' with your password

Log in to reply