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

Page Not Displayed on IIS8 and Windows Server 2012 #2590

Closed
ghost opened this issue Sep 9, 2016 · 40 comments
Closed

Page Not Displayed on IIS8 and Windows Server 2012 #2590

ghost opened this issue Sep 9, 2016 · 40 comments

Comments

@ghost
Copy link

ghost commented Sep 9, 2016

Hi All,

I am getting the attached screen while trying to access the Snipe IT site from IIS server.

I followed the steps as mentioned the Snipe IT manual Guide.

I am using PHP V7.0 and IIS 8

Any and All Help is appreciated.

Please see the screen shots below.
error 2
error 1
error 3

@ddreier
Copy link

ddreier commented Sep 9, 2016

In URL Rewrite there is a rule that redirects all requests to HTTPS. That rule needs to be disabled if you don't want the redirect to happen.

@ghost
Copy link
Author

ghost commented Sep 9, 2016

I deleted the rule that redirects HTTP to HTTPS, Restarted the website and the server however the problem still remains.

error 5

Please let me know if there is any other screen shots that would be of any help.

@ddreier
Copy link

ddreier commented Sep 9, 2016

Clear your cache in IE, or try a different browser. They usually remember redirects.

@ghost
Copy link
Author

ghost commented Sep 12, 2016

Clearing Cache didnt work.

@ddreier
Copy link

ddreier commented Sep 12, 2016

Ok, what about trying a different browser or trying to access the site from a different computer? If it's still redirecting, you may have to slog through the Web.config file and make sure that there isn't anything in there that seems like it would be causing the redirect.

@ghost
Copy link
Author

ghost commented Sep 12, 2016

Ive tried to access the site both on my work laptop and the VM that the server is hosted on. I tried on both IE and Chrome.

@korio77
Copy link

korio77 commented Sep 13, 2016

Hi Mkazhuka, i have seen the pics and the .env file is a bit weird for me. the one i have its a bit different.

Check the app key, that "base64:" at the beggining seems like a wrong copy paste.

Also check the quotes, on my .env file i have almost everything quoted.

Im using the same setup than you, iis8 and windows server 2012.

I will attach an screen for you so you can check your .env file.

Also, give to us the log files of every part involved (lavarel, iis server, php, browser) so we can se where exactly its broken, my first shot is the .env file.
image

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 , Thank you for the response, can you tell me the exact locations of the log files. Im not sure where they are.

Also upon checking the file and changing the ip and putting it in quote, When I restarted the page and went to the link I get HTTP Error 500.

@korio77
Copy link

korio77 commented Sep 13, 2016

i think the one we need to see is the log from php go to the php manager in your iis.
image

And there you can see the error log, give us a pic.

image

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 , The main error I see are

[13-Sep-2016 09:05:40 America/New_York] 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
[13-Sep-2016 09:05:40 America/New_York] 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

I can upload the whole log file if you would like

@korio77
Copy link

korio77 commented Sep 13, 2016

Thats nice, now we know whats happening.

That error is related to composer, seems like your is not installed or something happened when you installed it.

Check the common issues page

https://snipe-it.readme.io/docs/common-issues

There you can find this error and how to solve it.

image

Check it out and tell us when everything works again :D

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 , I followed the guide, Downloaded the composer, Moved the .exe into the C:\inetpub\wwwroot\snipe-it folder and right click and installed. The help files you linked are broken and give me a 404 when trying to get to them.

@korio77
Copy link

korio77 commented Sep 13, 2016

I see.

Check this https://snipe-it.readme.io/docs/install-dependencies at the bottom, once you have done that keep following the documentation to finish the installation.

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 I followed the directions, Please see attached pictures.

composer
composer2

@korio77
Copy link

korio77 commented Sep 13, 2016

The documentation is a bit weird in some places because its made almost entirely for a "linux" enviroment, some things works different in windows.

Having that in mind, and as i can see in the pics, seems like you have composer properly installed, have you used the comand "composer install" in the cmd window before?

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 This what what happens when I try to run composer install after navigating to c:\inetpub\wwwroot\snipe-it.

composerinstallerror

@korio77
Copy link

korio77 commented Sep 13, 2016

All you need to do is read, see that window, its telling you that you need to enable the php extensions of "curl" and "fileinfo", to do that go to your php manager in the iis server
image

And check if you have it like this
image

Search the required extensions you dont have enabled in the disabled list, right click them and enable.

Once you finish, restart the iis server (i think restarting the Windows erver is not needed) and then run the comand again.

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 , I have all of those enabled accept php_ldap.dll and php_pdo_sqlsrv.dll

Please see attached.

php pluggins

@korio77
Copy link

korio77 commented Sep 13, 2016

Then there is something wrong with your php installation or config.

Check the php.ini file and look for the extensions if they are enabled there too, sometimes you can have multiple php.ini files so use a folder search and check all of them.

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 , I think I found an issue, There were two php install directories here(root and program files). I changed it to the C:\PHP that composer was looking for and changed the IIS Server to look at that php-cgi and the composer was able to be installed.

@ghost
Copy link
Author

ghost commented Sep 13, 2016

I generated a new key, restarting the server.

@korio77
Copy link

korio77 commented Sep 13, 2016

Good news, keep going!

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 , I restarted the server and now the errors im getting in the PHP Log are.

[13-Sep-2016 09:53:03 America/New_York] PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "C:\inetpub\wwwroot\snipe-it\storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php:13906
Stack trace:
#0 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13836): Monolog\Handler\StreamHandler->write(Array)
#1 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13596): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#2 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13694): Monolog\Logger->addRecord(400, Object(UnexpectedValueException), Array)
#3 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13389): Monolog\Logger->error(Object(UnexpectedValueException), Array)
#4 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13360): Illuminate\Log\Writer->writeLog('error', Object(UnexpectedValueException), Array)
#5 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php(57): Illumi in C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php on line 13906
[13-Sep-2016 09:53:03 America/New_York] PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "C:\inetpub\wwwroot\snipe-it\storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php:13906
Stack trace:
#0 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13836): Monolog\Handler\StreamHandler->write(Array)
#1 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13596): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#2 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13694): Monolog\Logger->addRecord(400, Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)
#3 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13389): Monolog\Logger->error(Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)
#4 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php(13360): Illuminate\Log\Writer->writeLog('error', Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)
#5 C:\inetpub\wwwroot\snipe-i in C:\inetpub\wwwroot\snipe-it\bootstrap\cache\compiled.php on line 13906

@korio77
Copy link

korio77 commented Sep 13, 2016

image

@ghost
Copy link
Author

ghost commented Sep 13, 2016

Permissions were already set like that.

snipeitpermissions

@korio77
Copy link

korio77 commented Sep 13, 2016

that error is related to the bootstrap folder permisions, i cant remember this one well (i had this problem a long time ago), but i have 2 iis users onE is the one you have, the other one is this one

image

try to check if you have this user too (change "esagprdwsus" with your server name).

In the end you need to grant permisions to the user the iis server is using , in the past i had to check our friend google for more info about that to see which one was the real user the iis server was using.

@ddreier
Copy link

ddreier commented Sep 13, 2016

Judging by The stream or file "C:\inetpub\wwwroot\snipe-it\storage/logs/laravel.log" could not be opened, it probably needs to be added to the docs that you need to assign the same permissions to C:\inetpub\wwwroot\snipe-it\storage.

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 @ddreier , I added the permissions to C:\inetpub\wwwroot\snipe-it\storage. Now when I load the website im getting "Whoops, looks like something went wrong."

We're getting somewhere!

@korio77
Copy link

korio77 commented Sep 13, 2016

enable the debug mode in the .env file, restart the iis server and reload the page (deleting cookies) you should get some error logs there, and check the php log again to see if there is anything new!

@ghost
Copy link
Author

ghost commented Sep 13, 2016

Here is a screenshot of the debug mode On. There is nothing new in the PHP Log

debug

@ddreier
Copy link

ddreier commented Sep 13, 2016

Well, there's no mystery there. Check the credentials that you put in your .env file and check the permissions on your database.

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@ddreier Working on it right now. I will let you know.

@korio77
Copy link

korio77 commented Sep 13, 2016

remember the single quotes ;)

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@korio77 @ddreier , Thank you both. Looks like were working now.

pre flight

However when I hit the Create Database Tables, It shows Whoops, looks like something went wrong.
on http://10.16.1.50/setup/migrate?

pre flight 2

@ghost
Copy link
Author

ghost commented Sep 13, 2016

Syntax error or access violation: 1142 CREATE command denied to user 'snipe_user'@'localhost' for table 'migrations' From the Debug file.

was "grant all on snipeit to 'snipe_user'@'localhost' identified by 'YOUR_DB_PASSWORD_HERE';" correct to assign permissions

@ddreier
Copy link

ddreier commented Sep 13, 2016

Did you give your Snipe-IT database user permissions to create tables? It's easiest just to give that user all privileges on that database.

@ghost
Copy link
Author

ghost commented Sep 13, 2016

@ddreier im having issues guiving the user permissions. "grant all on snipeit to 'snipe_user'@'localhost' identified by 'YOUR_DB_PASSWORD_HERE';" is giving me an error

@ghost
Copy link
Author

ghost commented Sep 13, 2016

I got it going Thank you both for all your help

@ddreier
Copy link

ddreier commented Sep 13, 2016

If you're 100% up and running, please close the Issue.

@irfan-mirza686
Copy link

Hey Everyone I read your discussion. I had same problem
require(C:\xampp\htdocs\gs1prod\storage\framework\views\3e36c40b862db769c1426aed7accad244ebf9c6b.php): failed to open stream: No such file or directory (View: C:\xampp\htdocs\gs1prod\resources\views\admin\providers\include\cr_activity.blade.php)
When I open multiple page at the same time I get this problem. sometimes "No such file or directory" sometimes "permissions denied"

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

No branches or pull requests

3 participants