Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Error: 500 (Internal Server Error) #796

Closed
yekski opened this issue May 10, 2015 · 9 comments
Closed

Server Error: 500 (Internal Server Error) #796

yekski opened this issue May 10, 2015 · 9 comments

Comments

@yekski
Copy link

yekski commented May 10, 2015

Hello Snipe

Im on my 2nd day of installing and trying to figure out how to run Snipe-IT.
Using just IP is fine with me so as to isolate the issue. I managed to install everything and was able to display up to http://192.168.100.100/snipe-it/ (showing content of the folder) but when i clicked the public Im still getting the page not found error.

Pls help. what i else do i need to check. Also mod_rewrite is installed and configured.

I both installed it in Centos and Ubuntu and got exact similar problem.

Thanks in advance

@snipe
Copy link
Owner

snipe commented May 10, 2015

As I mentioned in the other thread, please see the issue on this page. http://snipeitapp.com/documentation/common-issues/

Also, you need to make the public directory the DocumentRoot.
http://snipeitapp.com/documentation/installing-on-linuxosx/#Apache

@yekski
Copy link
Author

yekski commented May 10, 2015

Thanks Snipe.

Mod_rewrite is already enabled. I've run a phpinfo and it shows that its enabled.

When I access http://192.168.100.100 its redirected me here http://192.168.100.100/auth/signin but still getting the Server Error: 500 (Internal Server Error).

@snipe
Copy link
Owner

snipe commented May 10, 2015

What is in your logs?

@yekski
Copy link
Author

yekski commented May 10, 2015

Apache does not show any error.

Im assuming you need log from the /var/www/html/snipeit/app/storage/logs

Here's the result of tail -f /var/www/html/snipeit/app/storage/logs/log-apache2handler-2015-05-10.txt

#3 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#5 /var/www/html/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#6 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true)
#7 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#8 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#9 /var/www/html/snipeit/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#10 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#11 /var/www/html/snipeit/public/index.php(49): Illuminate\Foundation\Application->run()
#12 {main} [] []

@snipe
Copy link
Owner

snipe commented May 12, 2015

Can you show me your CLI output from start to finish while installing? It looks like something went wrong somewhere in the install.

@yekski
Copy link
Author

yekski commented May 12, 2015

Thanks Snipe

Actually when I checked the complete logs it does show a "Database [] not configured". I've checked the common issues but still can't find where the error/misconfig might be. Here are my configs

[root@snipe-it production]# cat /etc/hosts

192.168.100.100 snipe-it snipe-it.mydomain.com

[root@snipe-it bootstrap]# hostname

snipe-it.mydomain.com

[root@snipe-it bootstrap]# cat start.php

$env = $app->detectEnvironment(array(

'local'         => array('snipe-it.mydomain.com','AlisonMBP'),
'staging'       => array('snipe-it.mydomain.com'),
'production'    => array('snipe-it.mydomain.com')

[root@snipe-it production]# cat database.php

'mysql' => array(
'driver' => 'mysql',
'host' => 'snipe-it.mydomain.com',
'database' => 'snipeit_laravel',
'username' => 'root',
'password' => 'password',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',

[root@snipe-it production]# cat app.php

'url' => 'http://snipe-it.mydomain.com',

[root@snipe-it production]# mysql -u root -p

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| snipeit_laravel |
+--------------------+
3 rows in set (0.16 sec)

[root@snipe-it logs]# cat log-apache2handler-2015-05-12.txt
[2015-05-12 06:11:56] local.ERROR: exception 'InvalidArgumentException' with message 'Database [] not configured.' in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:263
Stack trace:
#0 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(156): Illuminate\Database\DatabaseManager->getConfig(NULL)
#1 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(64): Illuminate\Database\DatabaseManager->makeConnection(NULL)
#2 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2922): Illuminate\Database\DatabaseManager->connection(NULL)
#3 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2888): Illuminate\Database\Eloquent\Model::resolveConnection(NULL)
#4 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1849): Illuminate\Database\Eloquent\Model->getConnection()
#5 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1790): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()
#6 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1764): Illuminate\Database\Eloquent\Model->newQueryWithoutScopes()
#7 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(656): Illuminate\Database\Eloquent\Model->newQuery()
#8 /var/www/html/snipeit/app/models/Setting.php(10): Illuminate\Database\Eloquent\Model::find(1)
#9 /var/www/html/snipeit/app/storage/views/630c7f6ad6db333384aae82658c0a93d(11): Setting::getSettings()
#10 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(37): include('/var/www/html/s...')
#11 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(56): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/s...', Array)
#12 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(134): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/s...', Array)
#13 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(102): Illuminate\View\View->getContents()
#14 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(76): Illuminate\View\View->renderContents()
#15 /var/www/html/snipeit/app/storage/views/9c5f9c3c264e6ab9e9005b6e2367b1d4(65): Illuminate\View\View->render()
#16 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(37): include('/var/www/html/s...')
#17 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(56): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/s...', Array)
#18 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(134): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/s...', Array)
#19 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(102): Illuminate\View\View->getContents()
#20 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(76): Illuminate\View\View->renderContents()
#21 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Http/Response.php(43): Illuminate\View\View->render()
#22 /var/www/html/snipeit/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php(202): Illuminate\Http\Response->setContent(Object(Illuminate\View\View))
#23 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1501): Symfony\Component\HttpFoundation\Response->__construct(Object(Illuminate\View\View))
#24 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1036): Illuminate\Routing\Router->prepareResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View))
#25 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#26 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#27 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#28 /var/www/html/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#29 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true)
#30 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#31 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#32 /var/www/html/snipeit/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#33 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#34 /var/www/html/snipeit/public/index.php(49): Illuminate\Foundation\Application->run()
#35 {main}

Next exception 'ErrorException' with message 'Database [] not configured. (View: /var/www/html/snipeit/app/views/backend/layouts/default.blade.php)' in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:263
Stack trace:
#0 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(41): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(InvalidArgumentException), 1)
#1 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(56): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/s...', Array)
#2 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(134): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/s...', Array)
#3 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(102): Illuminate\View\View->getContents()
#4 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(76): Illuminate\View\View->renderContents()
#5 /var/www/html/snipeit/app/storage/views/9c5f9c3c264e6ab9e9005b6e2367b1d4(65): Illuminate\View\View->render()
#6 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(37): include('/var/www/html/s...')
#7 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(56): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/s...', Array)
#8 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(134): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/s...', Array)
#9 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(102): Illuminate\View\View->getContents()
#10 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(76): Illuminate\View\View->renderContents()
#11 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Http/Response.php(43): Illuminate\View\View->render()
#12 /var/www/html/snipeit/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php(202): Illuminate\Http\Response->setContent(Object(Illuminate\View\View))
#13 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1501): Symfony\Component\HttpFoundation\Response->__construct(Object(Illuminate\View\View))
#14 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1036): Illuminate\Routing\Router->prepareResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View))
#15 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#16 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#17 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#18 /var/www/html/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#19 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true)
#20 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#21 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#22 /var/www/html/snipeit/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#23 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#24 /var/www/html/snipeit/public/index.php(49): Illuminate\Foundation\Application->run()
#25 {main}

Next exception 'ErrorException' with message 'Database [] not configured. (View: /var/www/html/snipeit/app/views/backend/layouts/default.blade.php) (View: /var/www/html/snipeit/app/views/backend/layouts/default.blade.php)' in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:263
Stack trace:
#0 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(41): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(ErrorException), 1)
#1 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(56): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/s...', Array)
#2 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(134): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/s...', Array)
#3 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(102): Illuminate\View\View->getContents()
#4 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(76): Illuminate\View\View->renderContents()
#5 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Http/Response.php(43): Illuminate\View\View->render()
#6 /var/www/html/snipeit/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php(202): Illuminate\Http\Response->setContent(Object(Illuminate\View\View))
#7 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1501): Symfony\Component\HttpFoundation\Response->__construct(Object(Illuminate\View\View))
#8 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1036): Illuminate\Routing\Router->prepareResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View))
#9 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#10 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#11 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#12 /var/www/html/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#13 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true)
#14 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#15 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#16 /var/www/html/snipeit/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#17 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#18 /var/www/html/snipeit/public/index.php(49): Illuminate\Foundation\Application->run()
#19 {main} [] []
[root@snipe-it logs]#

@yekski
Copy link
Author

yekski commented May 12, 2015

Hello Snipe

Finally got it working. Also from your other thread (#192).

I moved the database.php to app/config then the errors are gone. Thanks a lot

@ersenthil07
Copy link

2023/11/16 04:56:23 [warn] 2292#2292: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/snipeit.conf:3
2023/11/16 04:56:23 [warn] 2296#2296: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/snipeit.conf:3
2023/11/16 04:56:31 [warn] 2302#2302: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/snipeit.conf:3
2023/11/16 05:54:34 [warn] 888#888: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/snipeit.conf:3
2023/11/16 04:58:19 [warn] 972#972: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/snipeit.conf:3
2023/11/16 05:00:44 [warn] 1349#1349: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/snipeit.conf:3
2023/11/16 05:00:44 [warn] 1350#1350: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/snipeit.conf:3
2023/11/16 05:13:18 [warn] 1513#1513: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/snipeit.conf:3

@ersenthil07
Copy link

unable to login , it showing 500 server error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants