Snipe-IT Asset Management Installation Documentation

Welcome to the Snipe-IT documentation hub. You'll find comprehensive guides and documentation to help you install Snipe-IT as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Common Issues

Problem Installing/Upgrading?

We've moved the the most common installation/upgrade issues to their own page. If you're having an issue installing or upgrading Snipe-IT, please check the Installation/Upgrading Issues page before opening a ticket on Github.

Quick Tip: Handy Command

Many issues can be resolved if you remember to run the following commands when you encounter weird errors:

composer dump-autoload
composer clear-compiled
php artisan config:clear
php artisan view:clear
php artisan cache:clear
php artisan route:clear

These commands clear out cached service files that help speed up modern PHP applications but can also very occasionally be out of date, resulting in odd errors. These caches will be regenerated normally, so they can be cleared without repercussion. (You can also run php update.php from the Snipe-IT project directory to run these commands and other helpful clean-up commands all at once.)

Call to undefined function Controllers\Admin\ldap_connect()

The PHP LDAP extension is not installed on your server. While this extension is not required for all Snipe-IT installations, it must be installed if you wish to use any of the LDAP functionality.

Error message: Error Output: PHP Fatal error: Call to undefined method IlluminateFoundationApplication::registerCoreContainerAliases() in ../src/Illuminate/Foundation/start.php on line 106

Remove bootstrap/compiled.php and your vendors dir, and try running php composer.phar update.

Error message: Image Source not readable

This usually means that the temporary directory is not writable by the web server. Check the permissions section of the documentation for your server OS and make sure you've granted the user the ability to write to the temp directory.

Error: Insufficient permissions! after upgrading

While older versions of Snipe can be updated rather painlessly by simply using php artisan migrate, when upgrading from ancient versions (i.e. v1.1) to newer versions you may experience issues with user deletion, viewing backups etc.

This is due to the fact that migrations will not automatically add "Admin" users to the new "Super User" permission group.

To resolve (without raw SQL/db queries) try the following:

  • login as an admin user
  • create a new (throw away) admin user with Super User permissions
  • log out and log back in as new user
  • elevate all the users who need Super User
  • log out and back into your regular admin account that has just been elevated
  • delete the throw away user you created earlier to ensure elevation worked

ErrorException thrown with message "Undefined index: fields"

This happens when the URL you've set in your configuration is not the actual URL your installation is using, for example if you had http://snipe.local as your URL in your configuration, but you are accessing the page from http://snipe-it.local.

IMPORTANT:

The URL in your configuration must be the exact URL you use to access the site, or else you'll run into a CORS/domain policy error or a 404 on critical pieces.

404 Errors on Javascript, CSS or Image Files

This happens when the URL you've set in your configuration is not the actual URL your installation is using, for example if you had http://snipe.local as your URL in your configuration, but you are accessing the page from http://snipe-it.local.

IMPORTANT:

The URL in your configuration must be the exact URL you use to access the site.

Error when LDAP syncing: ldap_control_paged_result_response(): No server controls in result

This unhelpful error happens when your connection didn't trigger any other errors, but it's not able to get any results. This can sometimes happen if your AD/LDAP server will only send results over TLS, and you don't have the "Use TLS" checkbox checked in Admin > LDAP.

Changes to my .env file don't seem to be updating

Some web servers requires that you restart the web server after making changes to the .env file, so try restarting Apache/IIS/etc.

Also, if you ran the artisan command to cache your environmental variables for faster performance, run:

php artisan config:clear

to clear out your old cached values.

Exception in BaseEncrypter.php on line 44 getJsonPayload() -> throw new DecryptException('The payload is invalid.')

Disable Xdebug.

Broken Barcodes

If your barcodes are not showing up properly, there can be a few different explanations:

  • Check the permissions on your public/uploads/barcodes directory and make sure that directory is writable by the server.
  • Confirm that the barcode type you've selected is compatible with your asset tags. For example, if you have selected EAN5 barcodes need 5 characters, numbers only. If your asset tags are a combination of numbers and letters, that won't be compatible. That's just a limitation on the barcode specifications, not something specific to Snipe-IT.

"Whoops" error on checkin/checkout

If the item is correctly checked in or out in the database, but instead of returning you to the previous page, you see a "Whoops" error, the cause of this is usually that your email or your slack web hook is misconfigured. Check your settings and try again.

Permission Denied error when trying to send a test mail on CentOS or RHEL

If you are using CentOS, RHEL or some other SELinux enabled distribution, SELinux may be preventing Apache from opening any outgoing sockets.

In order to allow it, run the following command:

setsebool -P httpd_can_network_connect on

Google Maps not loading

If your set your Google Maps API so you can display maps on locations and suppliers pages in v4.1.7+ and your maps aren't showing up, this usually means you haven't authorized your Google API key to use the Maps APIs. (It's a long, convoluted process that Google makes far more confusing than it should be.)

The easiest way to verify if this is what's happening is to view the map image url in a browser directly. You'll probably see something like The Google Maps API server rejected your request. This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/static_maps_backend?project=_

In the Google Developers console, go to Library, search for Maps and enable the Maps APIs. (If you want to limit it to just the ones we need, I think it's the Maps Simple Embed API or Static Maps API.)

It can take a minute or two after enabling those APIs for google to recognize that it’s authorized now.

Error creating API token: Trying to get property of non-object ClientRepository.php#81

Run php artisan passport:install.

Unable to send email using Gmail

If you you encounter errors like ErrorException in StreamBuffer.php line 94: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed when trying to send mail (via forgotten password, asset checkout confirmation, etc) and you're using email, there are a few possibilities. First, make sure you've followed all of the steps outlined in the Gmail configuration section.

If you're still having trouble, this most often happens when you have an invalid or missing SSL root bundle with a self-signed SSL certificate.

First, make sure your php.ini has curl.cainfo, openssl.cafile and openssl.capath point to the right cacert.pem file.

If you don't have it. you can download it from https://curl.haxx.se/ca/cacert.pem and place it anywhere you want.

More information available here, here and here.

If none of those things work, you can try using mail as your MAIL_DRIVER in your .env to send emails locally from the server without dealing with an SMTP server.

Cannot Delete Import Files

If you're running on IIS and you've already confirmed that the uploaded import files do actually exist on the server, make sure you've configured your server to use the additional HTTP verbs required.


Common Issues