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

Installation on Windows

Open YCYee912 opened this issue 11 years ago • 59 comments

@snipe, do you mean this? composer

YCYee912 avatar Feb 04 '15 00:02 YCYee912

No, the composer install has to come before the artisan install.

snipe avatar Feb 04 '15 00:02 snipe

or this? It seems i having some error on it..i tried to follow the instruction from your WIndows Installation doc.. however, I am totally newbie in this can't understand much..thanks for your teaching image

YCYee912 avatar Feb 04 '15 00:02 YCYee912

The composer error you're seeing is telling you what's wrong. You don't have the fileinfo extension loaded into your PHP which is a requirement for using Snipe-IT.

Please see the fileinfo usage and installation instructions:

Windows users must include the bundled php_fileinfo.dll DLL file in php.ini to enable this extension.

That DLL file is bundeled with PHP 5.3.6 for example, you can find the files here: PHP For Windows - Binaries and sources Releases. It should be already located in the ext subdirectory of your PHP installation. If not download it again from the said website (choose your PHP version) and place it into the extension directory.

You need to add the following line your php.ini then to activate it:

extension=php_fileinfo.dll

That's the standard procedure to activate a PHP extension under windows. You can find more information about how to actiave a PHP extension here: Installation of extensions on Windows. If you have problems to locate the php.ini file, please refer to the PHP installation instructions - Installation on Windows systems.

Then re-run the composer installation and the artisan installation.

snipe avatar Feb 04 '15 00:02 snipe

@snipe image thanks for you guidance, after i located the php_fileinfo.dll it manage to install and download some necessity when i run the composer install..and then i got this..how to solve this?

YCYee912 avatar Feb 05 '15 13:02 YCYee912

This looks like a temporary error in DNS resolution. You should be able to try again and it should work. Unless you have some kind of strange DNS server running that doesn't let you resolve hostnames.

If not, it seems to want you to install Git, but I don't think I had heard that one before - that's usually only if you want to develop on Snipe-IT - and you just want to use it, so it shouldn't be required.

uberbrady avatar Feb 05 '15 20:02 uberbrady

hmm.. i tried to re-run again it still prompt out the same issue..then i attempted to ignore it and install the php artisan..it came out this again. Am I missed out something?? image

YCYee912 avatar Feb 05 '15 21:02 YCYee912

@YCYee912 Is it possible that your company network/firewall might be blocking the request for the DNS that composer is trying to access? You can't really ignore composer, it's what downloads and sets up all of the dependencies, so that last error is to be expected if you didn't run it.

snipe avatar Feb 05 '15 21:02 snipe

alright understand that..i re-run again and then i got this for few times.. image

YCYee912 avatar Feb 05 '15 21:02 YCYee912

What happens if you run composer without the dev dependencies?

php composer.phar install --no-dev

snipe avatar Feb 05 '15 21:02 snipe

(I assume you're not going to be doing any development on Snipe-IT, just using it as an end-user, in which case you don't need the developer libraries.)

snipe avatar Feb 05 '15 21:02 snipe

erm..which file should i put in this?

YCYee912 avatar Feb 05 '15 21:02 YCYee912

You don't put it in a file, you just add the --no-dev flag onto the composer command so that it knows not to load the developer libraries.

snipe avatar Feb 05 '15 21:02 snipe

(I'm not sure which command you use to try to run the composer install, since you're on windows, but whatever that command is, just add --no-dev to the end)

snipe avatar Feb 05 '15 21:02 snipe

is it like this? image

YCYee912 avatar Feb 05 '15 21:02 YCYee912

Yep, that looks correct. In your composer.json file, can you reove the line that says:

"mtdowling/classpreloader": "4.2.*",

Then save the file and try re-running composer install?

snipe avatar Feb 05 '15 22:02 snipe

i couldn't find this in my composer.json...am i having the correct file? The following is my content in the file

{ "name": "snipe/snipe-it", "description": "A free open source IT asset/license management system built in PHP on Laravel 4.1 and Bootstrap 3.", "keywords": ["framework", "laravel", "assets", "IT", "management"], "homepage": "http://snipeitapp.com/", "license": "AGPL-3.0", "support": { "issues": "https://github.com/snipe/snipe-it/issues", "source": "https://github.com/snipe/snipe-it" }, "require": { "laravel/framework": "4.1.", "cartalyst/sentry": "2.0.", "barryvdh/laravel-debugbar": "1.x", "chumper/datatable": "dev-master", "bacon/bacon-qr-code": "dev-master", "intervention/image": "dev-master" }, "require-dev": { "phpunit/phpunit": "*" }, "autoload": { "classmap": [ "app/commands", "app/controllers", "app/models", "app/database/migrations", "app/database/seeds", "app/tests/TestCase.php" ] }, "scripts": { "pre-update-cmd": [

    ],
    "post-update-cmd": [
        "php artisan optimize",
        "php artisan debugbar:publish"
    ],
    "post-install-cmd": [
        "php artisan debugbar:publish"
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},
"config": {
    "preferred-install": "dist",
    "bin-dir": "bin"

},
"minimum-stability": "dev"

}

YCYee912 avatar Feb 05 '15 22:02 YCYee912

No, no, you're right.

Try ADDING:

"classpreloader/classpreloader": "1.0.2",

ABOVE the

"laravel/framework": "4.1.",

bit and save and re-run

snipe avatar Feb 05 '15 22:02 snipe

added, same outcome. thought you said want to install without "dev"?

YCYee912 avatar Feb 05 '15 22:02 YCYee912

Instead of 1.0.2 for that, use 1.2.0. If that works, I'll explain why it worked :)

snipe avatar Feb 05 '15 22:02 snipe

(you can run composer with or without the --no-dev flag this time)

snipe avatar Feb 05 '15 22:02 snipe