Issue upgrading v4 to go to v5

Hi Guys,

Having no end of trouble here. I’ve thankfully got it all backup up, but its driving me crazy.

Quite simply, overwrote the files from 4.5.16 to 4.5.46 to upgrade them running php 7.3. I just get a forbidden with anything but my original files actually in place and I am struggling to understand why. The .env has not been touched and moving the old files back into place sees everything load again. I cannot see any permission issues etc, so I just cannot figure out why a full FTP upload / overwrite that took hours just refuses to play.

Help!

Hi,

You may want to try setting up a clean v4 install and then copy over the .env file and database.

Ta, was the rewrite for /public in the new .htaccess causing the issue. Sigh!
Now will try the v5 import.

Just wondering. when testing v5 before I was getting a 500 error trying to preview the invoice. At least can keep billing clients until I figure this out but is there a fix for this issue?

Thanks!

There’s info here about PDFs in v5

https://invoiceninja.github.io/docs/self-host-troubleshooting/#pdf-conversion-issues

Thanks so much Hillel,
Actually it was pretty easy to figure out. Simply the .htaccess needs to point to /public and the overwriting of that with new version blocked that and was not in the instructions.

To save me pain I installed a trial of Scriptaculous and got 5 running in minutes, amen!

But one issue related to the above, I create the PDFs fine, but I seem to be only able to save the invoice once. Trying to save any changes gets me a 500 error which kinda sucks.

Is it worth changing handler to fix this or would the problem be elsewhere?
Glad otherwise to be in 5. It has some quirks that take a bit of getting used to, modding invoices is causing me pain and I wish Zapier hadn’t dumped the create task handler that was in v4, but otherwise awesome work and very much appreciated!

Are there any details about the 500 in storage/logs

Thanks Hillel,
Bit late replying but it will generate a PDF to start with and then after save I cannot then update the PDF without the error and then cannot save any further invoice updates as it errors out from there.
The logs have:

[2022-01-28 11:21:43] production.ERROR: There was an error generating the PDF with Phantom JS {“exception”:"[object] (App\Exceptions\PhantomPDFFailure(code: 0): There was an error generating the PDF with Phantom JS at /home/spacedotnet/public_html/nja/app/Utils/PhantomJS/Phantom.php:150)
[stacktrace]
#0 /home/spacedotnet/public_html/nja/app/Utils/PhantomJS/Phantom.php(100): App\Utils\PhantomJS\Phantom->checkMime(’{“name”:"HttpSt…’, Object(App\Models\InvoiceInvitation), ‘invoice’)
#1 /home/spacedotnet/public_html/nja/app/Jobs/Entity/CreateEntityPdf.php(122): App\Utils\PhantomJS\Phantom->generate(Object(App\Models\InvoiceInvitation))
#2 /home/spacedotnet/public_html/nja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Jobs\Entity\CreateEntityPdf->handle()
#3 /home/spacedotnet/public_html/nja/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#4

Hi,

Can you confirm you’re using the latest version of v5?

Thanks Hillel!
Am on 5.3.33
I also get a Cron not enabled error I cannot seem to solve.

I installed via Softaculous, so just wondering which path is best to take when updating IN?

Have the crons be configured?

I believe a newer version should be available through softaculous.

Thanks :slight_smile:
I thought I did all this when I installed.
Is there any tut link on setting the cron up properly?
And is upgrading likely to fix that PDF issue?

The docs are here:

https://invoiceninja.github.io/docs/self-host-troubleshooting/#cron-not-running-queue-not-running

Softaculous found the .49 version but I get:
… Failed
This installation is already at latest version OR This script can not be Auto Upgraded.

Do I have to manual upgrade it and would I use the Git commands or have to manually download it and go through all that?

@kororo

It sounds like your host has not yet updated their softaculous repo to have the latest release. 5.3.55 is available on Softaculous currently.

Its my VPS and yep it lists .55 now as latest version.
It still refuses to auto-update, so what would be the best way to approach updating?