500 internal server error without any error in logs file

Hi everyone? I have installed invoice ninja by the following guide but getting 500 internal server error and there is no error in the logs.

I also noticed that if the error occur by following command in index.php at root/public/ directory.

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);
$response->send();

Here is my .env file.
APP_NAME=“Invoice Ninja”
APP_ENV=development
APP_KEY=
APP_DEBUG=true

APP_URL=https://ninja.liveinc.ca/

DB_CONNECTION=db-ninja-01
MULTI_DB_ENABLED=false

DB_HOST1=localhost
DB_DATABASE1=ninja
DB_USERNAME1=ninja
DB_PASSWORD1=ninja
DB_PORT1=3306

DB_HOST2=localhost
DB_DATABASE2=ninja2
DB_USERNAME2=ninja
DB_PASSWORD2=ninja
DB_PORT2=3306

DEMO_MODE=false

BROADCAST_DRIVER=log
LOG_CHANNEL=stack
CACHE_DRIVER=file
QUEUE_CONNECTION=database
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=‘user@example.com’
MAIL_FROM_NAME=‘Self Hosted User’

POSTMARK_API_TOKEN=
REQUIRE_HTTPS=false

GOOGLE_MAPS_API_KEY=
API_SECRET=superdoopersecrethere
ERROR_EMAIL=
TRUSTED_PROXIES=

NINJA_ENVIRONMENT=selfhost

PHANTOMJS_KEY=‘a-demo-key-with-low-quota-per-ip-address’
PHANTOMJS_SECRET=

SELF_UPDATER_REPO_VENDOR = invoiceninja
SELF_UPDATER_REPO_NAME = invoiceninja
SELF_UPDATER_USE_BRANCH = v2
SELF_UPDATER_MAILTO_ADDRESS = user@example.com
SELF_UPDATER_MAILTO_NAME = “John Doe”
COMPOSER_AUTH=’{“github-oauth”: {“github.com”: “${{ secrets.GITHUB_TOKEN }}”}}’
SENTRY_LARAVEL_DSN=https://cc7e8e2c678041689e53e409b7dba236@sentry.invoicing.co/5

Here is my .htaccess file

RewriteEngine On
RewriteRule “^.env” - [F,L]
RewriteRule “^storage” - [F,L]
RewriteRule ^(.well-known)($|/) - [L]

RewriteRule ^(.*)$ public/$1 [L]

https://github.com/h5bp/server-configs-apache/blob/master/dist/.htaccess

# INTERNET EXPLORER

----------------------------------------------------------------------

| Iframes cookies |

----------------------------------------------------------------------

Allow cookies to be set from iframes in Internet Explorer.

https://msdn.microsoft.com/en-us/library/ms537343.aspx

http://www.w3.org/TR/2000/CR-P3P-20001215/

Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""

# MEDIA TYPES AND CHARACTER ENCODINGS

----------------------------------------------------------------------

| Character encodings |

----------------------------------------------------------------------

Serve all resources labeled as text/html or text/plain

with the media type charset parameter set to UTF-8.

https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset

AddDefaultCharset utf-8

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Serve the following file types with the media type charset

parameter set to UTF-8.

https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset

AddCharset utf-8 .atom \ .bbaw \ .css \ .geojson \ .js \ .json \ .jsonld \ .manifest \ .rdf \ .rss \ .topojson \ .vtt \ .webapp \ .webmanifest \ .xloc \ .xml

# WEB PERFORMANCE

----------------------------------------------------------------------

| Compression |

----------------------------------------------------------------------

# Force compression for mangled headers.
# https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html

<IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
        SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
        RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    </IfModule>
</IfModule>

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Map certain file types to the specified encoding type in order to
# make Apache serve them with the appropriate `Content-Encoding` HTTP
# response header (this will NOT make Apache compress them!).
# If the following file types wouldn't be served without the appropriate
# `Content-Enable` HTTP response header, client applications (e.g.:
# browsers) wouldn't know that they first need to uncompress the response,
# and thus, wouldn't be able to understand the content.

# http://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding

<IfModule mod_mime.c>
    AddEncoding gzip              svgz
</IfModule>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Compress all output labeled with one of the following media types.
# IMPORTANT: For Apache versions below 2.3.7 you don't need to enable
# `mod_filter` and can remove the `<IfModule mod_filter.c>` & `</IfModule>`
# lines as `AddOutputFilterByType` is still in the core directives.

<IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE "application/atom+xml" \
                                  "application/javascript" \
                                  "application/json" \
                                  "application/ld+json" \
                                  "application/manifest+json" \
                                  "application/rdf+xml" \
                                  "application/rss+xml" \
                                  "application/schema+json" \
                                  "application/vnd.geo+json" \
                                  "application/vnd.ms-fontobject" \
                                  "application/x-font-ttf" \
                                  "application/x-web-app-manifest+json" \
                                  "application/xhtml+xml" \
                                  "application/xml" \
                                  "font/opentype" \
                                  "image/svg+xml" \
                                  "image/x-icon" \
                                  "text/cache-manifest" \
                                  "text/css" \
                                  "text/html" \
                                  "text/javascript" \
                                  "text/plain" \
                                  "text/vtt" \
                                  "text/x-component" \
                                  "text/xml"
</IfModule>

Any type of help would be appreciated.

At a minimum you need to populate .env APP_KEY using php artisan key:generate and then php artisan optimize and make sure all permissions are correct.

In my experience if you see a 500 error there will be more details in either the web server error log or the application log in storage/logs

Thanks a lot [TechnicallyComputers],
After a long, the problem has been fixed by the following mentioned commands,

php artisan key:generate
php artisan optimize

Thanks for letting us know this helped! We’re happy you solved it :+1:

Cheers!