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
Snipe-It Installation on IIS (confusing at best) #2883
Comments
@brudnicke you need to install PHP and a database app. These can be installed in IIS from the Micorsoft Web Platform (https://www.microsoft.com/web/downloads/platform.aspx) Install the platform installer so that you can add PHP (PHP 7 should work fine), MySQL 5.5 etc.. additionally, once PHP is installed, you will have PHP Manager appear in your IIS Manager, You can enable there as well as enable additional PHP extensions that are needed as referenced in the install guide. Hope this helps! |
Thanks for the information. Was able to find the step by step requirements. However, when i try to access the site, it doesn't come up. Standard "The website cannot display the page". I've restarted IIS, and the server, but with no luck. |
Did you make sure to apply your hostname to the .env file you are accessing from. Also, did you make sure you added a DNS record as well for your server in your DNS entries? |
Not sure where I put a host name in the .env file. Not seeing a reference to it. As for DNS, I’ve created a record “snipeit” pointing to 10.10.199.12 (IP of website). I’ve tried accessing the site at http://10.10.199.12 and http://snipeit , but each of them comes up with HTTP ERROR 500. When I added the hostname snipeit.corp.domain.com to the bindings, when I try to hit the website, it brings up the generic IIS page. Here is the .env file: --------------------------------------------REQUIRED: BASIC APP SETTINGS--------------------------------------------APP_ENV=production --------------------------------------------REQUIRED: DATABASE SETTINGS--------------------------------------------DB_CONNECTION=mysql --------------------------------------------REQUIRED: OUTGOING MAIL SERVER SETTINGS--------------------------------------------MAIL_DRIVER=smtp --------------------------------------------REQUIRED: IMAGE LIBRARYThis should be gd or imagick--------------------------------------------IMAGE_LIB=gd --------------------------------------------OPTIONAL: SESSION SETTINGS--------------------------------------------SESSION_LIFETIME=12000 --------------------------------------------OPTIONAL: CACHE SETTINGS--------------------------------------------CACHE_DRIVER=file --------------------------------------------OPTIONAL: AWS S3 SETTINGS--------------------------------------------AWS_SECRET=null --------------------------------------------OPTIONAL: MISC--------------------------------------------APP_LOG=single The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
2.) Make sure you added a DNS record as well for your server in your DNS entries. Additionally make sure you set your bind address to the IP for your host server in IIS. One other thing. Make sure you have assigned the proper permissions as noted on this page for all the correct folders listed. https://snipe-it.readme.io/v3.0/docs/windowsiis |
Site won’t respond. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
after you made all changes. did you restart IIS? or at leaset restart the single site in IIS |
Yes. Using the IISRESET command. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
Not sure if this makes a difference, but I ran the php artisan key:generate command, but the key is still set to ChangeMe in the .env file. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
that makes a big difference. Yes, that key is important. You have created a copy of .env.example and made your changes and saved it as .env only correct? You should also be able to take the appkey and manually add it to your .env file. I would restart your site after that. |
Yes. I’m working with a .env file. I’m using Notepad+++ to edit and save it. Does it store the key somewhere after you run the command. I enter the command, and it just goes right back to a command promp.t The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
Yes, it is supposed to write the key automatically to the .env file. Are you running |
Yes. Should it be run from an elevated command prompt? The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
I would, to make sure you have write access to the directory when the command is run. |
I tried using the elevated command prompt, but it did not change the file. I confirmed the security again. The file also has everyone with full control. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
manually copy the key it generates on the screen to the .env save and restart IIS |
It’s not generating a key (at least it’s not displaying one on the screen). From: JExactly [mailto:notifications@github.com] manually copy the key it generates on the screen to the .env save and restart IIS — The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
I am currently out of ideas, Maybe someone else has some additional ideas |
If it's not displaying a key, something else is wrong. Check your laravel log file after you run the key generation and see if anything shows up |
@snipe Maybe he didn't get composer installed properly and he is missing some dependencies? |
Where is the laravel log located? The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
@brudnicke the laravel log is located in /inetpub/www/%yoursnipeitdirectory%/storage/logs. i was wondering, did you get composer installed in your snipe-it directory and run the composer commands to install all the dependencies? |
There is no log there. I did download and run composer from the snipe-it directory. It went through something (no prompts) and then it was finished. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
Open an administrative command prompt, navigate into your snipe-it directory and run this command: |
Result output: E:\Sites\Snipe-It>composer install --no-dev --prefer-source Problem 1 To enable extensions, verify that they are enabled in those .ini files: E:\Sites\Snipe-It> The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
You need to make sure any extensions that are required are enabled. Open IIS Manager, open up PHP Manager. Under PHP Extensions, enable php_fileinfo.dll. restart IIS for safe measure, rerun the command again. You need to make sure all PHP extensions that are required are installed and enabled. These were listed under requirements in the hlp documentation here: https://snipe-it.readme.io/docs/requirements Enable all required that are not already while you are in there, enabling fileinfo. |
Lots of progress. Thanks. The extensions in question are installed. I was able to generate a key and it was placed in the .env file. When I try to hit the site now, it come ups to /setup with the error 404 – Directory Not Found. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
did you make sure to set your directory permissions for IIS as documented here: https://snipe-it.readme.io/v3.0/docs/windowsiis ? |
Additionally, Make sure that under your sites Advanced settings in IIS, that your public directory is your physical path for exaple: C:\inetpub\wwwroot%snipeitdirectory%\public |
Yes. I just re-verified, and the permissions are set as specified in that article. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
you have to remove the entry that has the issue. it doesn't apply to IIS AFAIK |
It doesn’t identify the offending string. Options -MultiViews
The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
in the file I attached, I have removed the string already. |
Apologies. I didn’t see the attachment. I downloaded and tried to import, but I received same data error. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
all you should have in the .htaccess is `
` |
In the Rewrite Rules box: Options -MultiViewsMake sure .env files not not browseable if in a sub-directory.<FilesMatch ".env$"> Still unable to save. Same data error. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
Were you able to successfully get this up and going? |
Not yet. I haven’t been able to get the modified .htaccess to import in to IIS. It keeps giving me that invalid data error. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
You know, I totally forgot after V3 you no longer need to import the .htaccess as it is all handled with the web.config file in the public directory. I wouldn't worry about importing the url rewrite rules. However, as long as URL Rewrite is a component listed in you site components.. You should be good. The issue seems to me then would be that your default Physical path under your sites advanced settings is not set correctly.. for example: C:\inetpub\wwwroot\SNIPE-IT\public |
My physical path is pointing to E:\Sites\Snipe-It\public (which is where the public folder is located). NOTE: There is no setup directory located under Public. When opening the website, I get: [cid:image001.png@01D23E7A.CAA21DC0] The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
Maybe @snipe has a better answer. I am sure there is no \setup directory because URL Rewrite handles the rewrite to the correct location for the setup. |
Also, I think what I would reccommend is that your remove and re-add proper permissions for the folders and restart your IIS server and see if anything changes. As well as make sure that your .ENV file has all it's proper settings and that your mysql user has proper rights to make changes to your database |
What should be in the web.config file? The one I have is blank. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
Thanks. The website came up to the config page. It seems to have passed all the checks, but when I click create database tables, it goes to a “Whoops, something went wrong” page. The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
I would check your laravel logs now |
Sounds like your database user doesn't have rights to do what it needs to the snipeit database you created. |
Were you able to resolve this @brudnicke ?? |
No. I’ve gone through the permissions again, and checked the database settings, but it still won’t let me continue on to the ‘configure tables’ portion of setup. From: JExactly [mailto:notifications@github.com] Were you able to resolve this @brudnickehttps://github.com/brudnicke ?? — The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited. Birkey’s Farm Store, Inc. |
I would check your logs and drop them here |
@brudnicke, it sounds like @JExactly is correct that your database user might not have permissions to create the tables. Hopefully, this is resolved and you're using Snipe-IT successfully. However, if not I may be able to help. At this stage of the install process, a co-worker and I were having all sorts of problems with the URL Rewrite rules:
I'll attach the Windows Server/IIS install instructions that I made while going through this process. We have been using Snipe-IT successfully for a few months now and I've used the process on multiple test servers, so I think it's ready to be shared - I hope you find it helpful. |
Nothing is attached, You will likely have to do it through the web. |
Here is the laravel log. |
@brudnicke All the errors in the log that I am reading, It appears that a connection to your database is not happening and therefor it cannot complete its steps. I would recommend double checking the database steps listed here: https://snipe-it.readme.io/v3.6.1/docs/creating-a-database-and-db-user Is this a mysql DB? Can you supply what is listed in your .env file under : REQUIRED: DATABASE SETTINGS--------------------------------------------DB_CONNECTION=mysql |
@brudnicke Did you get this resolved? |
No. I re-rant the database setup, but I still get the same “whoops, something went wrong” error.
From: JExactly [mailto:notifications@github.com]
Sent: Tuesday, December 13, 2016 9:34 AM
To: snipe/snipe-it
Cc: Brian Rudnicke; Mention
Subject: Re: [snipe/snipe-it] Snipe-It Installation on IIS (confusing at best) (#2883)
@brudnicke<https://github.com/brudnicke> Did you get this resolved?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2883 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AWLwtnJgVxn1REBcuK1kkr-2gNKVQLVpks5rHrrtgaJpZM4Kpjlt>.
The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited.
Birkey’s Farm Store, Inc.
|
Is your DB located on your localhost? |
Yes.
From: JExactly [mailto:notifications@github.com]
Sent: Tuesday, December 13, 2016 10:10 AM
To: snipe/snipe-it
Cc: Brian Rudnicke; Mention
Subject: Re: [snipe/snipe-it] Snipe-It Installation on IIS (confusing at best) (#2883)
Is your DB located on your localhost?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2883 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AWLwtqzt1NJZIsFJMS-C6w22W1BRh9ipks5rHsNagaJpZM4Kpjlt>.
The information including any attachments contained in this document is confidential and is for the use only of the intended recipient. If you are not the intended recipient, you should notify the sender and delete this message immediately. Any distribution, disclosure, or copying of this message, or the taking of any action based on its contents is strictly prohibited.
Birkey’s Farm Store, Inc.
|
have you tried updating to the latest version to see if your issue was a bug that was fixed? I know there was mention of fixes related to Pre-flight issues. Which is where you seem to be having problems. |
Is there a clear, concise, step by step install guide for making Snipe-It work on Windows Server 2012 using IIS? I'm finding bits and pieces here, but they are referencing PHP, database, etc, and no where does it show where I get these programs, what versions, when/where to install.
The IIS setup document only tells me how to create the site, and adjust permissions. The dependencies page only states to download and run composer from the snipe-it directory. That program is asking for some type of PHP command.
The text was updated successfully, but these errors were encountered: