I downloaded the latest version of Invoice Ninja, ensuring I was running PHP 8.3 with required dependencies but got the following error when I accessed the …/public folder:
500 — Server Error
Not very helpful I know but looking for some guidance please.
hillel
August 27, 2024, 7:41pm
2
Hi,
Are there details about the 500 error in storage/logs?
Hi
Thanks for the response.
I took a different route in the end and installed again on a fresh domain and used the migration feature.
The install of v 5.10.26 went well actually but when I came to migrate from v4 to v5 I got the following message:
Oops, something went wrong. Migration can’t be processed at the moment. Please checks the logs.
Here’s the last few lines from the laravel.log file on the v5 installation:
2024-08-27 22:27:33] production.INFO: Importing account
[2024-08-27 22:27:33] production.INFO: Importing company
[2024-08-27 22:27:33] production.INFO: Importing users
[2024-08-27 22:27:33] production.INFO: Importing payment_terms
[2024-08-27 22:27:33] production.INFO: Importing tax_rates
[2024-08-27 22:27:33] production.INFO: Importing clients
[2024-08-27 22:28:05] production.INFO: Importing company_gateways
[2024-08-27 22:28:05] production.INFO: Importing client_gateway_tokens
[2024-08-27 22:28:05] production.INFO: Importing vendors
[2024-08-27 22:28:07] production.INFO: Importing projects
[2024-08-27 22:28:07] production.INFO: Importing products
[2024-08-27 22:28:07] production.INFO: Importing credits
[2024-08-27 22:28:07] production.INFO: Importing recurring_invoices
[2024-08-27 22:28:28] production.INFO: Importing invoices
[2024-08-27 22:29:18] production.INFO: Importing quotes
[2024-08-27 22:29:20] production.INFO: Importing payments
[2024-08-27 22:29:51] production.INFO: Importing expense_categories
[2024-08-27 22:29:51] production.INFO: Importing task_statuses
[2024-08-27 22:29:51] production.INFO: in task statuses
[2024-08-27 22:29:51] production.INFO: finished task statuses
[2024-08-27 22:29:51] production.INFO: Importing expenses
[2024-08-27 22:29:51] production.INFO: Resource recurring_expenses is not available for migration.
[2024-08-27 22:29:51] production.INFO: Importing tasks
[2024-08-27 22:29:53] production.INFO: Importing documents
[2024-08-27 22:29:57] production.INFO: Resource activities is not available for migration.
hillel
August 28, 2024, 6:58am
4
What version of v4 are you using?
v4.5.42
I tried upgrading to 4.5.50 but when I updated the PHP to 7.4 the site just refused to work.
hillel
August 28, 2024, 9:30am
6
I believe you’ll need to use 4.5.50
Are there any errors in the logs?
Hi Hillel
I tried updating the PHP and the page simply refuses to load.
Is there perhaps a manual DB option we can use?
hillel
August 28, 2024, 1:03pm
8
If the page isn’t loading there should be details in either storage/logs or the web server error logs
It’s possible to export/import data as CSV however the results will be far inferior to using the migration tool
I updated the PHP to 7.4 and loaded the website in a private window and got the following error:
Whoops, looks like something went wrong.
In the file “laravel-error.log” I have this (the time is one hour behind but I assume it’s the right entry and file):
[2024-08-28 13:07:07] production.ERROR: ***ErrorException*** [0] : /home/billing1/public_html/app/Models/Account.php [Line 1126] => Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)` (View: /home/billing1/public_html/resources/views/auth/login.blade.php) {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0","locale":"en","ip":"119.12.242.149","count":1,"is_console":"no","is_api":"no","db_server":"mysql","url":"login"} []
hillel
August 28, 2024, 1:50pm
10
I suggest setting up a phpinfo page to confirm the web server is using PHP 7.4
hillel
August 28, 2024, 2:34pm
12
OK. But surely the file producing the error: login.blade.php is Invoice Ninja’s file, no?
hillel
August 28, 2024, 2:50pm
14
I’m not saying otherwise, my point is if you Google the “Unparenthesized a ? b : c ?: d
” most results are related to PHP 8 being installed.
OK.
Is this something we can fix perhaps as I need to migrate to a new server and that’s why I want to upgrade the billing system to v5. Easier all round.
hillel
August 28, 2024, 4:55pm
16
You may want to try setting up v4 on a different server
Thanks. How would I then get the data from the existing version 4 to the new one?
hillel
August 28, 2024, 6:52pm
18
You can use mysqldump to transfer the database, you also need to copy over the .env file
OK. I will give that a go.
I assume the process would be…
• Install anew instance of v4.5.50
• Overwrite DB & .ENV files from v4.5.42 → v4.5.50
• Migrate from v4.5.50 → v5.10.26
Oh, and the .htaccess file too from 4.5.42 → 4.5.50 ?
hillel
August 28, 2024, 8:47pm
20
Correct
Have you made any changes to the .htaccess file?