Failing to self host v5 on apache & php7.4

Howdy, I downloaded v5.0.25 from the github release page, uploaded the zip to my subdomain, unpacked it, checked my php v7.4, and I get a blank page at root.

Returning as a 500 error on some browsers, web host said this:

Blockquote
[19-Nov-2020 00:15:35 UTC] PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /home/danjwill/ninja.skinnlab.com.au/public/index.php on line 54

Any ideas why I’m not currently able to experience the magic of v5?

Hi,

Just to confirm… did you download the file called ‘invoiceninja.zip’?

1 Like

Ah, great catch. I think I downloaded the source code, not the zip from the release. Will try again.

Yeah… it’s an easy mistake to make.

@dave any ideas to help clarify this?

Installation screen is showing now, after testing all the details per section during installation, having success and clicking continue, I got a 404 error.

I then went back to the base domain and now see the login screen but get this error: 403: Error: {“message”:“Invalid secret”,“errors”:{}}

Reading other posts I tried setting a randomised key, no luck. Also tried setting 1234, no luck.

Added note: the URL pre-filled field has /api/v1 after it, is this correct or should it be base domain? I have tried logging in with and without but I still get the secret key error.

The secret should be optional, is there a value set in the .env file.

Note: if you change the .env file you need to run php artisan optimize

The URL needs to include the full domain.

Right. Well it doesn’t let me use the one in the env, or none. The error persists.

To be clear… have you tried removing the API_SECRET value and then running php artisan optimize

I’ll give it a go. I’m no pro so I’ll have to work out if I can run that command on shared hosting. Will report back.

Any luck with this installation?

Turns out it was an SQL version issue on the server.

Waiting for host to update before installing via softaculous.