Migrating From v4.5.17 to v5

I can try that but the database wasn’t even created.

I’ll start it again topday and come back with any issues.

Thanks for your patience.

I just tried SMTP and got this:

However, when I set it to “log” it worked.

Why bother adding in SMTP if it doesn’t work? Sounds odd.

OK, so we have v5 running, or so it seems.

We then went to the v4 site and started the migration and got this:

I checked the logs and there’s well over 16,000 get requests followed by this:
[2021-06-22 06:21:20] production.INFO: get invoice items [] []
[2021-06-22 06:21:20] production.INFO: get resource recurring_invoice_id invitations [] []
[2021-06-22 06:21:20] production.INFO: get invoice items [] []
[2021-06-22 06:21:20] production.INFO: get resource recurring_invoice_id invitations [] []
[2021-06-22 06:21:20] production.INFO: get quotes [] []
[2021-06-22 06:21:20] production.INFO: get payments [] []
[2021-06-22 06:21:20] production.INFO: get credits [] []
[2021-06-22 06:21:20] production.INFO: get documents [] []
[2021-06-22 06:21:20] production.INFO: get expense categories [] []
[2021-06-22 06:21:20] production.INFO: get task statuses [] []
[2021-06-22 06:21:20] production.INFO: get expenses [] []
[2021-06-22 06:21:20] production.INFO: get tasks [] []
[2021-06-22 06:21:20] production.INFO: get documents [] []
[2021-06-22 06:21:21] production.INFO: { “message”: “Server Error” } [] []

Quick update…

I increased the allocated disk space and now I get:

So I think (fingers crossed) that the issue was server space but there were no warnings of this.

Current state of play…

I started the migration at around 7 AM this morning and still it hasn’t migrated.

The info here may help:


@david do you have any other suggestions?

I decided to wipe the v5 installation and start again.

Now when I try to migrate I get the following message:

The error log isn’t much help to me, perhaps it will be for you…

[2021-06-22 11:04:49] production.INFO: {     "message": "Server Error" } [] []

The full log is too big to post here.

Have you checked the v5 logs in storage/logs/

There will be more information in the V5 logs in storage/logs/laravel.log

AHA, that looks more promising…

[2021-06-22 11:15:02] production.ERROR: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 {“exception”:"[object] (ErrorException(code: 0): file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 at /home/billing1/public_html/app/Jobs/Util/VersionCheck.php:37)

I think…

When the v5 installation was wiped the PHP version reverted to 7.3.

I’ve just switched it to 7.4 and will try again.

Nope, same again:

So, I rebuilt v5 on PHP 7.4 and got a blank screen when it had finished.

I went to the website and it worked but when I checked the log I saw this:

[2021-06-22 11:23:30] production.INFO: db fails

Also, no matter what I put into the mail settings only “log” works.

This starting to get tiresome now.

I have rebuild v5 from the bottom up. I deleted all files on the server an dthe MySQL DB and when I try to recreate it I get a blank page and then when I try to access the domain I get the setup script again.

Do you have anywhere a step by step guide to do this using the ZIP file provided?

Maybe this will help @hillel, @david . . .

I deleted the cPanel account and started from scratch.

On setup I got to the section that asked for the MySQL details and input them. The page reported success but the laravel log was created and had just this single entry:

[2021-06-22 17:53:17] production.INFO: db fails

Any thoughts ?

Also, when I get to the email settings section despite choosing SMTP and insertin the correct details I get this error:


I even recreated the email account on the server, an email account that has functioned for months but still the same error.

Log is the only option that allow me to move on to the next step.

When I insert my user details at the bottom (the same as I use for v4) and click proceed all I get is a blank screen and when I try to load the site a 500 error.

Here’s the laravel log as it currnently stands:

[2021-06-22 17:53:17] production.INFO: db fails
[2021-06-22 18:04:44] production.INFO: account table not found
[2021-06-22 18:05:01] production.INFO: account table not found
[2021-06-22 18:05:24] production.INFO: account table not found

I think these are different problems.

The email problem looks like a network issue, does running telnet smtp.mailtrap.io 2525 on the server succeed?

The ‘account table not found’ error looks like the migration hasn’t run, maybe php artisan migrate will help.

This is the guide we recommend:

I ran terminal on the server and got the following error when I used “smtp.mailtrap.io 2525”:


As for the 2nd error:

This was encountered while installing v5, not migrating.

This is a live dedicated server running CentOS 7 64-bit WHM & cPanel with well over 100 live accounts so switching OSs isn’t going to be possible.

I specifically provisioned PHP 7.4 & also PHP 8 with all the required dependencies for this project and it has installed so understandably I am confused as to why all of a sudden it won’t.

I have previously managed to install v5 succesfully and the migration process started OK but hung for some reason.

Technically I should be able to re-install v5 but every time I try I run into problems.

Starting From Scratch → Again

  1. I extracted the ZIP files for ninja-v5.2.5-release.zip into the public_html folder.
  2. I cheked the database: No tables existed 8even from the previous install)
  3. Next I completed the “Database Connection” part of the setup and saw this in the log file:

[2021-06-22 19:59:30] production.INFO: db fails

I dont think I can go any further until this is resolved realistically.

It looks like you’re missing the telnet part in the first issue.

Here’s another guide: Install Invoice Ninja v5 on Enterprise Linux 8

With CentOS you will have to install with the source code package only, and you’ll have to prepare it with composer and npm additional steps. You can’t install automatic updates from the admin portal, and will have to update by source code installation again each time. Until it is better supported.

It also helps if you specify “php7.4-fpm.sock” instead of “php-fpm.sock” when configuring the web server.

1 Like


I’ve been at this 3 days now on and off and here’s where I am getting my installation details from but what I am being told here contradicts that, am I right?

I’ve run v4 on CentOS for years without any issues at all.