Migration issues StepsController.php [Line 320] => Class 'ZipArchive' not found

migration issues v4.5.42 > v5.2.5-C51 --both self hosted.

i installed per latest instructions for ubuntu for latest release, it is installed as a container on the latest version of proxmox. that went smooth except for having no data populated in the database. once i ran artisan migrate on the new v5 install then the setup finished and populated the .env and loaded and let me log in.

importing csv results in missing data. attempting to import JSON when i click import a few seconds later it asks if im sure v5 is installed.

i have increased limits on exec times, timeouts, max upload size, php memory size.

i updated v5 to latest but it only allows 50 clients so i rolled back to 5.2.5 before even trying to import or migrate anything. does the white label license remove the limit of 50?

[2021-07-20 18:39:20] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError [0] : /var/www/invoiceninja/app/Http/Controllers/Migration/StepsController.php [Line 320] => Class ‘ZipArchive’ not found {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“Aaron”,“method”:“POST”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0”,“locale”:“en”,“ip”:“www.xxx.yyy.zzz.45”,“count”:7,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“migration/companies”} []


Maybe you’re missing the PHP ZIP extension? It could explain the error.

well i have about given up on V5, migration, importing to or using it.

after giving up on the migration, i have tried importing both freshbooks imports and csv and due the the fact that it can’t seem to handle importing a simple client list.

after testing a small sample of importing 300 invoices from csv, the amount and balance fields were populated with a single zero.

i wrote some php/sql to check and populate the correct fields in the clients and clients_contacts as updating this info for 485 clients is not feasible.

this all seemed to work great for the clients data. everything showed up where it looks like it’s supposed to, ok.

so then i tried importing the entire csv of just shy of 20,0000 invoices. after it got to about 18,000 it seems to have hung, browser page went blank after a while so i just left it overnight, the page did refresh and loaded correctly, i ran optimize, and refreshed the data from the GUI, none of the invoices showed up in the GUI but are in the database with the amount and balance on zero for all of them. invoice numbers all correlate to correct customer ID in database.

after all that i log out and it won’t let me log back in and gives this error:
TimeoutException after 0:00:30.000000: Future not completed

i also have all the PHP max-memory limits and timeouts turned up on this VM.

Please check is_large is set to true for the company in the database. If is_large is false the app will attempt to load all data at login which can timeout with that many records.

@david can you please confirm the field is being auto-updated


the system does a daily check for is_large if the crons are running.

Ok, thanks! I think we should manually check the setting after an import completes. If you import a very large data set (as seems to be the case here) it can prevent the AP from logging in.

is_large is set to 1

even if i only import 1 invoice the amount, paid and balance do not fill in the database.
i broke the csv into separate files of 1000 each and they all imported taking about 25 minutes per each 1000.

everytime, unless i only import a few i get this.
TimeoutException after 0:00:30.000000: Future not completed

^ and this pops up a lot sitewide for example when pdf’s don’t generate. ^

before i get to the pdf’s…

if i populate the invoices table with the correct data for amount, and balance, what do i have to do with the payments, and the balances in the clients table?

i really don’t understand how v4 works so wonderfully and v5 seems like a trainwreck. if i can have “auto-pay” with authorize.net on v4 i wouldn’t even bother with v5.

snappdf generates the g.pdf file that i have seen you recommend to test. but i always get this…

500: Internal Server Error

    <title>Server Error</title>

    <!-- Fonts -->
    <link rel="dns-prefetch" href="//fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">

    <!-- Styles -->
        html, body {
            background-color: #fff;
            color: #636b6f;
            font-family: 'Nunito', sans-serif;
            font-weight: 100;
            height: 100vh;
            margin: 0;

        .full-height {
            height: 100vh;

        .flex-center {
            align-items: center;
            display: flex;
            justify-content: center;

        .position-ref {
            position: relative;

        .code {
            border-right: 2px solid;
            font-size: 26px;
            padding: 0 15px 0 15px;
            text-align: center;

        .message {
            font-size: 18px;
            text-align: center;
    <div class="flex-center position-ref full-height">
        <div class="code">
            500            </div>

        <div class="message" style="padding: 10px;">
            Server Error            </div>

where are the error logs?

what is the google api key for in the .env i am not seeing a map anywhere on v5

i created another php script that verify’s all incoming invoices have a match with a name in the clients table in ninja that is in a separate database for the incoming invoices with the invoice number set to unique to make sure there where no duplicate inv numbers, from there i exported that after verifying names and split them into smaller files.

i also stripped out any unnecessary data. no notes, terms or any long strings of text and made sure there where no special (?/{}’) characters anywhere.