I wiped out the entire directory of the latest version and I recreated the directory with the 5.3.17 zip file. After I dumped in the 5.3.17 zip, I changed ownership of the directory to www-data:www:data, ran php7.4 artisan generate:key and optimize. I am no longer getting the 500 error, but now when I am running the setup again, it still gives me the original issue in the screenshot of the original post. I wonder if there is a dependency which has been updated in Ubuntu and is breaking something.
Laravel.log again says
[2021-10-21 19:56:44] production.INFO: db fails
I don’t see anything in the nginx error logs either. here is the access log during the request, does not look like anything useful here:
I think the issue here is you are creating the .env before the setup. This would mean the defaults in the new .env are overriding what the app is expecting initially.
I believe there was a .env file was extracted from the zip. This is the result when I ran the above command (using php7.4:)
myusername@ninja:/usr/share/nginx/invoiceninja$ sudo php7.4 artisan migrate --seed
[sudo] password for myusername:
Application In Production! *
Do you really wish to run this command? (yes/no) [no]:
yes
In Connection.php line 692:
SQLSTATE[HY000] [1045] Access denied for user ‘ninja’@‘localhost’ (using password: YES) (SQL: select * from information_schema.tables where table_schema =
ninja and table_name = accounts and table_type = ‘BASE TABLE’)
In Connector.php line 70:
SQLSTATE[HY000] [1045] Access denied for user ‘ninja’@‘localhost’ (using password: YES)
Do I need to specify the database information in the .env before trying to start setup?
I was able to seed the database after specifying the database and credentials. I don’t know if I missed it somewhere, but I don’t recall seeing that in the instructions I was using. I will see if I can move forward now.
After this, I got a 500 error, and when I checked the laravel log, it gave me a permission denied writing inside /storage. I believe I had it www-data:www-data 755. I set permissions to 777 to test, and now suddenly I am getting the login screen and I am no longer seeing the setup. I set to 775 and I get the error again. It seems if I don’t have world set for rwx, I am getting the 500 error. It looks like I am making progress, but this configuration seems to me like a possible security issue.
I now have an instance where I can at least log in to v5. I tried a migration, and I got a “Whoops, something went wrong” error. I will now work through the troubleshooting guide for migration. I’m still concerned with the storage needing to be world writable.
Just to keep this updated, I believe I am seeing the issue in this thread now:
My old system was installed from a Turnkey linux image, and it appears to not have php-zip extension. I have installed the extension:
apt-get install php-zip
this required restart of apache:
service apache2 restart
I am now getting a new error. "Oops, something went wrong. Migration can’t be processed at the moment. Please checks the logs. "
Logs look like the same error in the laravel logs. I then installed the php-zip package on the new server, then I restarted both servers, and the migration appears to have started after trying again.
I have successfully migrated. That was a few hoops to jump through, especially trying to get all the snappdf dependencies set, but I was very happy with 4.5 until phantompdf quit working.
for anyone else trying this, I had to check the laravel log file, and reference the missing library each time PDF generation failed and add libraries. I used this list:
I suppose you could just add all of the libraries in the list, but I did one at a time so as to not install any extra items which may be unnnecessary on my system.
Next up is to get email working. I will stop updating this topic unless I can help someone else troubleshoot.
Great. I had issues with smtp, but it was because of a typo. I don’t know anything about your intended mail setup, but if you use TLS, it’s usually port 587.
It’s always the same. domain-com.mail.protection.outlook.com, port 25, TLS optional. No user or password to login as it only allow requests from my public IP to send mail.
Using the same settings on a bunch of other services no problem.
Ok, if you’re using O365, I would at least try it with TLS, port 587, and log in with some credentials. In my experience it’s more likely to work, and you can change/troubleshoot it later. I used to do more google, so I don’t have a ton of experience lately with Microsoft’s SMTP though.
These are the settings from the docs that I always use. I have some entries in my public DNS and also on the exchange server for it to work. I use these settings successfully with other stuff.
Starting to think this may be a limitation of Invoice Ninja itself. Not sure.
It doesn’t seem to even try and send an email unless a username and password are entered. But with the connector setup I have always used, you don’t use a username or password.
I couldn’t get the SMTP test to pass. I just selected “Log” and I’m on the dashboard. Hoping I can figure out how to reconifgure the email settings for my setup later.