Message: Class "mysqli_driver" not found during setup

Hi,

I have seen another user post this error, there was no solution in this post however.

Trying to install Invoiceplane. Installed latest versions of php (8.3.6), mariadb and apache2. Had to downgrade php to 8.1 because of the codeIgniter software compatibility. Now I’m stuck at the database portion of setup . I have created a database in MariaDb and specified the admin account I entered during mariadb installation/setup.

Error:

An uncaught Exception was encountered

Type: Error

Message: Class “mysqli_driver” not found

Filename: /var/www/html/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php

Line Number: 123

Backtrace:

File: /var/www/html/application/third_party/MX/Loader.php
Line: 183
Function: DB

File: /var/www/html/application/modules/setup/controllers/Setup.php
Line: 279
Function: database

File: /var/www/html/application/modules/setup/controllers/Setup.php
Line: 216
Function: check_database

File: /var/www/html/index.php
Line: 329
Function: require_once

I have checked and confirmed that /var/www/html/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php
is present and security mode is 777 on this file and the whole conthents of the IP folder actually.

Can you help me out?
many thanks
Michiel

1 Like

First advice:

I have a feeling this is a local system thing instead of CodeIgniter (or its fork) crapping out.

I can remember someone posting the same problem as you mentioned.
I might have given him a few pointers?

Initial thought: php_mysqli (if that still exists)
Whenever we install PHP locally on a (Linux) PC or on a server we install a bunch of PHP packages.

Like fpm, zip, xml you name it.
I still think mysqli is missing from that list.

Second thought: i thought we were using PDO instead of mysqli, so why would that error even occur?

Third thought: Is it possible to use Docker instead? (Only if you can’t get the mysqli problem resolved) try this repository for that: GitHub - InvoicePlane/InvoicePlane-Docker

Thanks for replying @UnderDog .

  • Aware of IP not being compatible with PHP > = 8.2, that;s why I downgraded to PHP 8.1
  • I wil try to check if mysqli is missing from the php 8.1 installation I downgraded to.

Ad second thought: Assuming this is not meant for me but co developers

Ad 3rd thought: I have no experience with that but will try. I do have some vintage experience with VMware and the like, this will help a bit. Assuming that it will be easier because a functioning virtual machine with Invoice plane installed is ready to go

There were no visible pointers at the other guy’s post; he was asked to contact directly

1 Like

Ok, 1 step back:

  • are you trying this out on a host?

  • are you trying this out on your personal server (VPS)?
    TransIP has reasonably cheap servers (VPS)

  • On your own personal PC: Windows? Mac?

With personal PC & Windows, try Laravel Herd
Docker is easier (more fun) than VMWare.

Windows has something called “Windows Subsystem for Linux” and within that you could get Docker to work.

Laravel Herd is waaaaayyy easier.
It’s 1 installer. It’s for Windows and for Mac.

Laravel Herd is usable for free.

Hi,
I’ve installed Invoice plane on an Ubuntu installation on an old Acer Revo one PC I have here at home.
In the mean time I also installed docker on the same pc. THis all went fine until I installed a container from [ttps://github.com/mhzawadi⁠]. This installation ended with error '‘failed to set up container networking’ for endpoint Invoiceplane. Failed to bind host port for 0.0.0.0:80:172.17.0.3:80/tc: address already in use.

Is this error easy to fix?

I will also try Laravel herd. I actually tried to install Invoiceplane first on my windows PC in windows subsystem for Linux , but I also ended up with networking problems between host and wsl instance if I remember correctly. My sys admin skills are a bit rusty. Haven’t done this for 8 years. Lots has changed :wink:

PS; installing laravel herd now. I notice it’s downloading php 8.4 . Which is not compatible with Invoice plan, right? Then I would have to use this fork of codeigniter you mentioned before I suppose

1 Like

Lots of questions, i’m going to cover them all.

[quote=“michieliooo, post:5, topic:11817”]
I’ve installed Invoice plane on an Ubuntu installation on an old Acer Revo one PC I have here at home.[/quote]

Awesome, that means you can use Docker. You don’t need to use Laravel Herd on Ubuntu.

See the Docker instructions below, when i answer your question about containers on Linux

For Windows we can try Laravel Herd and WSL. For Linux we can try Docker.
After Herd has installed its PHP 8.4, you can install PHP 8.1 and “set that as default”, maybe even for just the InvoicePlane site.
Here’s a video of me trying to install Invoiceplane on Laravel Herd. Maybe too simplistic, but you’ll get the drift. https://youtu.be/MMYrazwb2IA?si=ZIQ5I3ZlHcu33fhm

Wait with using that CodeIgniter fork until we release version 1.7.0

ah, linux. Yes, there is an easy fix. There are already containers running.
Let me first give you my solution for Docker.


  • git clone https://github.com/InvoicePlane/InvoicePlane-Docker.git ivpldock
  • cd ivpldock
  • cp .env.example .env edit the .env file and make sure the PHP version is 8.1. Z-- The location of the "projects" is …/projectsso either change that in the .env file or create a~/projects` directory and place InvoicePlane in it.
  • cp sites/copyme.example.conf sites/ivplv1.conf.
    Edit the nginx config file. Remove that “public” from the “root” directory.
    Location of invoiceplane could be /var/www/projects/invoiceplane
  • ./starmeup

The containers will start building.


Now let’s take a look at running containers.
docker ps will show all running containers

You can turn them off with docker-compose down but do it from the directory they got started from.
If that directory doesn’t have a docker-compose.yml file (i don’t think mhazwadi has that file) then you have to turn off Docker containers in another way.

With docker stop <id of container from docker ps> you can stop running containers

Hope it helps

Thanks! I will try soon and focus on the Docker solution. Will let you know how things go!

1 Like

InvoicePlane <<<=== i have a tiny thread about it on Discord

And this is the link to that thread Discord