snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Internal server: 500 when trying to launch Snipe-IT website.

Open petrus2014 opened this issue 12 years ago • 29 comments

Hello all

I have installed and configured Snipe-IT on a Windows Server 2008 R2 server with IIS. However when I try to browse the website or launch it from a browser I keep getting an internal server error 500. Could someone please help me solve this issue?

TIA Pierre

petrus2014 avatar Nov 06 '14 11:11 petrus2014

I have never run snipe-it on IIS but on apache when I got this error it was because the app\storage directory under the root directory was not writable by the web server process.

SeanLebeau avatar Nov 06 '14 13:11 SeanLebeau

Are there instructions/procedures for installing and configuring Apache on a Windows Server 2008 R2 for Snipe-IT?

Thx

petrus2014 avatar Nov 06 '14 13:11 petrus2014

@petrus2014 can you tell us what's in your error logs?

snipe avatar Nov 06 '14 18:11 snipe

Hi petrus2014, Firstly, check your physical path correctly with this path C:\inetpub\wwwroot\snipe-it\public

Then try to configure binding on your IIS like this snipe_it_01

and call it by http://localhost:81 Hope helpful

D3PLOY avatar Nov 07 '14 02:11 D3PLOY

Hi D3Ploy. Thanks for this but still no luck. Still getting the same error.

petrus2014 avatar Nov 07 '14 07:11 petrus2014

Hello Snipe

I am including in this message the content of the error logs:

IIS:

#Software: Microsoft Internet Information Services 7.5 #Version: 1.0 #Date: 2014-11-07 07:35:14 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken 2014-11-07 07:35:14 ::1 GET / - 81 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 302 0 0 3088 2014-11-07 07:35:14 ::1 GET /auth/signin - 81 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 500 0 0 421 2014-11-07 07:39:43 129.1.0.211 GET / - 81 - 129.1.0.43 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/38.0.2125.111+Safari/537.36 302 0 0 234 2014-11-07 07:39:43 129.1.0.211 GET /auth/signin - 81 - 129.1.0.43 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/38.0.2125.111+Safari/537.36 500 0 0 249 2014-11-07 07:39:43 129.1.0.211 GET /favicon.ico - 81 - 129.1.0.43 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/38.0.2125.111+Safari/537.36 200 0 0 202

Snipe Storage Log:

I am seeing the following in the log file: Next exception 'ErrorException' with message 'SQLSTATE[HY000]: General error: 1 no such table: settings (SQL: select * from "settings" where "id" = 1 limit 1) (View: C:\inetpub\wwwroot\snipe-it\app\views\backend\layouts\default.blade.php) (View: C:\inetpub\wwwroot\snipe-it\app\views\backend\layouts\default.blade.php) (View: C:\inetpub\wwwroot\snipe-it\app\views\backend\layouts\default.blade.php)' in C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Connection.php:555

Are there any other error logs which I need to look at?

Thanks

petrus2014 avatar Nov 07 '14 07:11 petrus2014

And this is what I have in the php54 errors log:

[06-Nov-2014 09:49:01 Europe/Belgrade] PHP Warning: require(C:\inetpub\wwwroot\snipe-it\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\snipe-it\bootstrap\autoload.php on line 17 [06-Nov-2014 09:49:01 Europe/Belgrade] PHP Fatal error: require(): Failed opening required 'C:\inetpub\wwwroot\snipe-it\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\snipe-it\bootstrap\autoload.php on line 17

petrus2014 avatar Nov 07 '14 07:11 petrus2014

Do you have a database setup and have you run PHP artisan app:install??

madd15 avatar Nov 07 '14 08:11 madd15

Yes, I did run the PHP artisan app:install. I did not install any db. I thought that Snipe-IT comes with its own default db? Should I install the MariaDB?

petrus2014 avatar Nov 07 '14 08:11 petrus2014

Did you specify any DB information in the config as per the install guide??

You need a MySQL DB for Snipe-IT to run. If you have no DB then the php artisan app:install would not have worked correctly.

madd15 avatar Nov 07 '14 08:11 madd15

I didn't install MySQL DB on this server. In the config I specified as a default sqlite. Should I install MySQL DB then?

petrus2014 avatar Nov 07 '14 08:11 petrus2014

If you could install a MySQL DB and changing the config to that DB then run the install again to see if it will work

madd15 avatar Nov 07 '14 08:11 madd15

Ok. Am downloading MySQL for Windows and will let you know how I get on. Thanks for your help.

petrus2014 avatar Nov 07 '14 08:11 petrus2014

Any idea how I can create the default database under MySQL5.6? Thx

petrus2014 avatar Nov 07 '14 09:11 petrus2014

Have you tried googling it? I'm not trying to be a dick, but there are lots of resources out there.

snipe avatar Nov 07 '14 10:11 snipe

Ok will do :)

Thx

petrus2014 avatar Nov 07 '14 11:11 petrus2014

I've managed to get it working, well almost, because I cannot log in. As an email address I entered root@localhost by mistake and so when trying to log in it is being refused. How can I change or add a valid email address?

petrus2014 avatar Nov 07 '14 13:11 petrus2014

Easiest solution would be to drop the tables and run the installer again, to be honest.

snipe avatar Nov 07 '14 13:11 snipe

Success! Thanks I've now managed to log in. Thanks to everyone for your help. Nice weekend!

petrus2014 avatar Nov 07 '14 14:11 petrus2014

One final comment. Would it be possible in a future release to be able to change the currency symbol? I am based in Europe and we use the € currency symbol.

petrus2014 avatar Nov 07 '14 14:11 petrus2014