I’ve just done a fresh install following the instructions here:
Installing InvoiceNinja v5 Beta on Enterprise Linux 8 (RHEL, AlmaLinux, Rocky Linux)
I do not reccomend installing on this distro family.
I will start by saying I reccomend installing on Ubuntu. On rpm-based distros you cannot automatically update the package, and must do it manually, increasing the risk of user error and data loss, and increasing demand on manual labour. You must backup your .env file, and the contents of the public/storage directory, to preserve your data before updating. …
When I connect to the setup page, it allows me to set up the email, db, and first user, but as soon as all that is done and tested, it crashes with a server 500 error.
Checking the php/apache error logs yields no errors, even though I have php logging enabled.
The system is Centos 7, Apache/2.4.58, php 8.1 on a shared hosting platform.
Thoughts on where to debug?
hillel
February 2, 2024, 8:46am
2
Hi,
There should be details about the 500 error in storage/logs.
I would have so too, but even though error logging is enabled in php.ini, there is absolutely nothing in the log. Am I missing something?
php.ini has:
log_errors = On
error_reporting = E_ALL
The only thing I can see is this:
client denied by server configuration: /var/www/html/.env
In the general Apache error log… strange thing is that /var/www/html/ is not where IN is installed or being served from.
So, I tried reinstalling it a folder in the main site rather than a subdomain where I did originally, and here’s the error I got right away when I just went to the site:
[Fri Feb 02 09:51:59.534033 2024] [proxy_fcgi:error] [pid 10468:tid 140192378963712] [remote 98.97.87.130:49210] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught ReflectionException: Class “view” does not exist in /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:912\nStack trace:\n#0 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(912): ReflectionClass->__construct()\n#1 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->build()\n#2 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(957): Illuminate\Container\Container->resolve()\n#3 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\Foundation\Application->resolve()\n#4 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(942)…PHP message: PHP Fatal error: Uncaught ReflectionException: Class “view” does not exist in /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:912\nStack trace:\n#0 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(912): ReflectionClass->__construct()\n#1 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->build()\n#2 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(957): Illuminate\Container\Container->resolve()\n#3 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\Foundation\Application->resolve()\n#4 /home/cylorix/domains/cylorix.com/public_html/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(942)…’
Is there maybe a dependency missing?
If I go to /public/setup, I can go through the initial setup/test but then it gives an error 500 when it tries to finish.
hillel
February 3, 2024, 4:25pm
6
I wouldn’t expect to see that error in a clean install, it may help to empty the bootstrap/cache folder.
I cleared the cache, and discovered that the error was because the DB’s were empty. I
found this article that had the missing step to set up the DB:
I’m not familiar with a /check_pdf route
I suggest checking the correct database credentials are set in the .env file
It set up the DB successfully, however, it’s still throwing a 500 error, which is not coming from Apache or PHP (those logs were on), but the code itself calling an undefined function… I enabled debug and here’s what is in the log:
[2024-02-05 23:27:32] production.ERROR: Call to undefined function Symfony\Component\Console\proc_close() {“exception”:"[object] (Error(code: 0): Call t
o undefined function Symfony\Component\Console\proc_close() at /home/mydomain/domains/mydomain.com/public_html/vendor/symfony/console/Terminal.php
:228)
[stacktrace]
#0 /home/mydomain/domains/mydomain.com/public_html/vendor/symfony/console/Terminal.php(204): Symfony\Component\Console\Terminal::readFromProcess()
#1 /home/mydomain/domains/mydomain.com/public_html/vendor/symfony/console/Terminal.php(170): Symfony\Component\Console\Terminal::getSttyColumns()
#2 /home/mydomain/domains/mydomain.com/public_html/vendor/symfony/console/Terminal.php(153): Symfony\Component\Console\Terminal::initDimensionsUsi
ngStty()
#3 /home/mydomain/domains/mydomain.com/public_html/vendor/symfony/console/Terminal.php(111): Symfony\Component\Console\Terminal::initDimensions()
#4 /home/mydomain/domains/mydomain.com/public_html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Terminal->getHeight()
#5 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Console/Application.php(163): Symfony\Component\Console
\Application->run()
#6 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(400): Illuminate\Console\A
pplication->call()
#7 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\Foundation\C
onsole\Kernel->call()
#8 /home/mydomain/domains/mydomain.com/public_html/app/Http/Controllers/SetupController.php(146): Illuminate\Support\Facades\Facade::__callStatic(
)
#9 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\SetupC
ontroller->doSetup()
#10 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing
\Controller->callAction()
#11 /home/mydomain/domains/mydomain.com/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracin
g.php(21): Illuminate\Routing\ControllerDispatcher->dispatch()
#12 /home/mydomain/domains/mydomain.com/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php(19):
Sentry\Laravel\Tracing\Routing\TracingControllerDispatcherTracing->Sentry\Laravel\Tracing\Routing\{closure}()
#13 /home/mydomain/domains/mydomain.com/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracin
g.php(20): Sentry\Laravel\Tracing\Routing\TracingRoutingDispatcher->wrapRouteDispatch()
#14 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(260): Sentry\Laravel\Tracing\Routing
\TracingControllerDispatcherTracing->dispatch()
#15 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runCo
ntroller()
#16 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\Routing\Route->run(
)
#17 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Routing\Router->
Illuminate\Routing\{closure}()
#18 /home/mydomain/domains/mydomain.com/public_html/app/Http/Middleware/RedirectIfAuthenticated.php(56): Illuminate\Pipeline\Pipeline->Illuminate\
Pipeline\{closure}()
#19 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\Redire
ctIfAuthenticated->handle()
#20 /home/mydomain/domains/mydomain.com/public_html/app/Http/Middleware/QueryLogging.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{
closure}()
#21 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\QueryL
ogging->handle()
#22 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate
\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#23 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Routing\Middlewa
re\SubstituteBindings->handle()
#24 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illum
inate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http
\Middleware\VerifyCsrfToken->handle()
#26 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminat
e\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#27 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\View\Middleware
\ShareErrorsFromSession->handle()
#28 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Ill
uminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#29 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middlewar
e\AddQueuedCookiesToResponse->handle()
#30 /home/mydomain/domains/mydomain.com/public_html/app/Http/Middleware/SessionDomains.php(30): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline
{closure}()
#31 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\Sessio
nDomains->handle()
#32 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pip
eline\Pipeline->Illuminate\Pipeline\{closure}()
#33 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Sess
ion\Middleware\StartSession->handleStatefulRequest()
#34 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Session\Middlewa
re\StartSession->handle()
#35 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pip
eline\Pipeline->Illuminate\Pipeline\{closure}()
#36 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middlewar
e\EncryptCookies->handle()
#37 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipelin
e->Illuminate\Pipeline\{closure}()
#38 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Pipeline\Pipeline->
then()
#39 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\Routing\Router->run
RouteWithinStack()
#40 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\Routing\Router->run
Route()
#41 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\Routing\Router->dis
patchToRoute()
#42 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Rou
ter->dispatch()
#43 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Foundation\Http
\Kernel->Illuminate\Foundation\Http\{closure}()
#44 /home/mydomain/domains/mydomain.com/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Illuminate\
Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#45 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Sentry\Laravel\Http\SetReq
uestIpMiddleware->handle()
#46 /home/mydomain/domains/mydomain.com/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Illuminate\Pi
peline\Pipeline->Illuminate\Pipeline\{closure}()
#47 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Sentry\Laravel\Http\SetReq
uestMiddleware->handle()
#48 /home/mydomain/domains/mydomain.com/public_html/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddl
eware.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#49 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\Features\SupportDi
sablingBackButtonCache\DisableBackButtonCacheMiddleware->handle()
#50 /home/mydomain/domains/mydomain.com/public_html/app/Http/Middleware/Cors.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}
()
#51 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\Cors->
handle()
#52 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipelin
e\Pipeline->Illuminate\Pipeline\{closure}()
#53 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware
\TrustProxies->handle()
#54 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Ill
uminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(
31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#56 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http
\Middleware\ConvertEmptyStringsToNull->handle()
#57 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Ill
uminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#58 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminat
e\Foundation\Http\Middleware\TransformsRequest->handle()
#59 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http
\Middleware\TrimStrings->handle()
#60 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illu
minate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#61 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http
\Middleware\ValidatePostSize->handle()
#62 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenan
ce.php(99): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#63 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http
\Middleware\PreventRequestsDuringMaintenance->handle()
#64 /home/mydomain/domains/mydomain.com/public_html/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(87): Illuminate\Pipeline
\Pipeline->Illuminate\Pipeline\{closure}()
#65 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Sentry\Laravel\Tracing\Mid
dleware->handle()
#66 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipelin
e->Illuminate\Pipeline\{closure}()
#67 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pi
peline->then()
#68 /home/mydomain/domains/mydomain.com/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\
Http\Kernel->sendRequestThroughRouter()
#69 /home/mydomain/domains/mydomain.com/public_html/public/index.php(57): Illuminate\Foundation\Http\Kernel->handle()
#70 {main}
"}
The installation guide needs to be updated, the functions “exec”, “proc_close” and “proc_open” all need to be enabled in php for it to function correctly.