I’m trying to install V5.0.18 from scratch with XAMPP 7.4.11
I tried also with previous V5 versions and always the same problem.
I cannot go beyond the setup page.
After I click the submit button i face an 500 | Server Error and when I remove the /setup from the link
The setup process starts again…
I had some problems regarding php and node commands not be recognized but this is not the case anymore.
Now if I open the apache error log I see the below.
[Fri Oct 16 15:05:35.172161 2020] [mpm_winnt:notice] [pid 7696:tid 624] AH00354: Child: Starting 150 worker threads.
[Fri Oct 16 15:36:12.697941 2020] [ssl:warn] [pid 9140:tid 612] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Oct 16 15:36:12.722927 2020] [core:warn] [pid 9140:tid 612] AH00098: pid file C:/xampp7411/apache/logs/httpd.pid overwritten – Unclean shutdown of previous Apache run?
[Fri Oct 16 15:36:12.723926 2020] [ssl:warn] [pid 9140:tid 612] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Oct 16 15:36:12.795885 2020] [mpm_winnt:notice] [pid 9140:tid 612] AH00455: Apache/2.4.46 (Win64) OpenSSL/1.1.1g PHP/7.4.11 configured – resuming normal operations
[Fri Oct 16 15:36:12.795885 2020] [mpm_winnt:notice] [pid 9140:tid 612] AH00456: Apache Lounge VC15 Server built: Aug 4 2020 11:50:23
[Fri Oct 16 15:36:12.795885 2020] [core:notice] [pid 9140:tid 612] AH00094: Command line: ‘c:\xampp7411\apache\bin\httpd.exe -d C:/xampp7411/apache’
[Fri Oct 16 15:36:12.798884 2020] [mpm_winnt:notice] [pid 9140:tid 612] AH00418: Parent: Created child process 5688
[Fri Oct 16 15:36:13.057736 2020] [ssl:warn] [pid 5688:tid 624] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Oct 16 15:36:13.080723 2020] [ssl:warn] [pid 5688:tid 624] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Oct 16 15:36:13.097725 2020] [mpm_winnt:notice] [pid 5688:tid 624] AH00354: Child: Starting 150 worker threads.
Hi, I had a /setup page redirect to /setup 302 problem which was caused by a bad database. My solution was to drop the ninja db in mysql and recreate it as per the docs, then I was able to get to the login screen.
You’re errors suggest an ssl certificate error:
www.example.com:443:0 server certificate does NOT include an ID which matches the server name
Have you configured an SSL certificate in Apache for your domain in use or are you running xampp on localhost?
P.S You could test by disabling SSL in Apache config by allowing traffic over port 80. In your virtual host file comment out the <VirtualHost _default_:443> section and leave a basic http config:
Those Apache logs show ssl errors or warnings to be more accurate but nothing that would cause a 500. You could disable ssl in xampp to stop the warnings in the logs or just ignore them.
Try clearing caches if you haven’t already, sometimes a 500 can be caused by the smallest things hanging around. cd to your invoice ninja directory and run:
sudo php artisan optimize
Then visit your url in a browser with this appended
This may clear the same caches I’m not entirely sure but it can’t hurt. Also I’d use an incognito browser window while you have the problem to rule out an error being cached. That run a few times with browser refreshes cleared a 500 for me once.
Then, if the problem still occurs check the following for clues:
Always have the console open while submitting forms in Ninja so you can monitor the logs for the cause of the 500 in the network tab.
Set debug to true in your .env file (in /invoiceninja) to enable the in browser debug bar - it was hit and miss for me whether it actually appeared but when it does it might give more clues.
Check your laravel.log file in /invoiceninja/storage/logs/ - This has given me some very helpful information.
Then check your normal linux logfiles:
firewall logs (disable firewall to rule it out)
It’s also worth taking a few minutes to check the documentation for each platform you are running (Apache, PHP, Distro) and see if there are debug modes you can enable. This will give you much more information in the logs to hopefully find the culprit.
Also read the guides by @TechnicallyComputers for your distro version as these have invaluable advice to get it running. I used bits from both of them to install on Debian. He also installed on VMs so the information might crossover to your setup:
The machine I’m trying to make it work is a windows pc through xampp, and I’m unable to run such commands, or I do not know the correct way, since if I open the shell on xampp and run php artisan I get the
“Could not open input file: artisan” error, which I believe has something to do with laravel…
But! you suggestion regarding enabling the debug, was indeed very helpful.
I found out that the .env actually was using the default credentials db name, username etc as ninja…
So I manually entered the correct credentials of my DB and bypassed the 500 error.
Unfortunately only to come with a new one… 404
If I leave the below bold db name as is, I get the 404 error,
If I switched it to my actual db name, I get that my db is not configured…
DB_DATABASE1=my actual db name
DB_USERNAME1= my user name
I have hit exactly the same issue on a clean install. I performed a clean install last week which worked, however this time round it failed twice already. I have enabled debug mode as suggested and the following is displayed in the browser:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘.accounts’ doesn’t exist (SQL: select * from accounts limit 1)
*Note: I changed the DB name to
I suspect the DB script did not execute to build the structure post the setup stage, as it returned to the setup page way too quickly. I then ran the setup a second time with everything the same, and low and behold there was a long pause after the submit was pressed. It actually worked and completed as expected.
It looks like the post altered some bits. The error should have looked like this:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘my-db-name.accounts’ doesn’t exist (SQL: select * from accounts limit 1)