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

Installation #217

Closed
firozhaneef opened this issue Aug 11, 2014 · 36 comments
Closed

Installation #217

firozhaneef opened this issue Aug 11, 2014 · 36 comments

Comments

@firozhaneef
Copy link

I have installed snipe-it, but i am getting this error message:Error in exception handler. Please help..

@snipe
Copy link
Owner

snipe commented Aug 11, 2014

Please provide more information. What is the OS you're running, what are the contents of the error log, what did you do to trigger the error, etc

@technogenus
Copy link

Is Apache running properly? i.e. if you remove your SNIPE-IT settings from the apache conf files does the Apache welcome/example page come up? If so, then re-enable your SNIPE-IT conf and then edit this application config file, and also restart apache (service httpd restart):

app/config/production/app.php (ex. /var/www/snipeit/app/config/production/app.php)
set the "debug" line = true

Reconnect and post the results.

@firozhaneef
Copy link
Author

I am using Ubuntu 12.04.5 LTS. My apache is running properly because i can access index.html files from apache root directory (/var/www). I have edited app/config/production/app.php file and set the deug=true. but still i am getting the same error message: Error in exception handler.

No more logs under storage/logs folder

Please see the config files

app.php

true, /* |-------------------------------------------------------------------------- | Application URL |-------------------------------------------------------------------------- | | This URL is used by the console to properly generate URLs when using | the Artisan command line tool. You should set this to the root of | your application so that it is used when running Artisan tasks. | */ 'url' => 'http://www.snipe-it-fta.com', /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set | to a random, 32 character string, otherwise these encrypted strings | will not be safe. Please do this before deploying an application! | | Run a php artisand key:generate --env=staging to create a random one */ 'key' => 'Change_this_key_or_snipe_will_get_ya', ``` ); start.php detectEnvironment(array( ``` 'local' => array('IT-1','IT-1'), 'staging' => array('staging.snipe-it.fta.com'), 'production' => array('www.snipe-it.fta.com') ``` )); /* |-------------------------------------------------------------------------- | Bind Paths |-------------------------------------------------------------------------- | | Here we are binding the paths configured in paths.php to the app. You | should not be changing these here. If you need to change these you | may do so within the paths.php file and they will be bound here. | */ $app->bindInstallPaths(require **DIR**.'/paths.php'); /* |-------------------------------------------------------------------------- | Load The Application |-------------------------------------------------------------------------- | | Here we will load the Illuminate application. We'll keep this is in a | separate location so we can isolate the creation of an application | from the actual running of the application with a given request. | */ $framework = $app['path.base'].'/vendor/laravel/framework/src'; require $framework.'/Illuminate/Foundation/start.php'; /* |-------------------------------------------------------------------------- | Return The Application |-------------------------------------------------------------------------- | | This script returns the application instance. The instance is given to | the calling script so we can separate the building of the instances | from the actual running of the application and sending responses. | */ return $app;

@firozhaneef
Copy link
Author

I have tried to re-install snipe-it, but i am getting this error message while i am running "php artisan app:install" command

Step: 2

Preparing your Application

Application key [IpKYNUf6yaOOhOT7KjM3xG5XbqmticgN] set successfully.

[InvalidArgumentException]
Database [] not configured.

app:install

@technogenus
Copy link

You have not completed all the installation instructions. You need to setup/configure MySQL (or another supported db), create database within MySQL, add a database user 'travis' with password, give the 'travis' user permissions on the newly created database, then finally edit your database.php file with the correct password and database name. Username 'travis' and database name 'snipeit_laravel' are the example defaults, but these can be anything you wish to setup.
(NOTE - for developers, you should use the example default db name and username for your development environment to ensure compatibility)

here is an example using MySQL5.6 on CentOS (redhat) using root account (if, smartly, not using root then you should issue 'sudo' at the beginning of the shell command 'mysql'

[root@machine /]# mysql -u root -p
Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1923
Server version: 5.6.20 MySQL Community Server (GPL)

mysql>create database snipeit;
mysql>create user 'travis'@'localhost' IDENTIFIED BY 'somepassword';
mysql>grant all privileges on snipeit_laravel.* to 'travis'@'localhost';
mysql>flush privileges;
mysql>exit;

@snipe
Copy link
Owner

snipe commented Aug 12, 2014

Hi @firozhaneef - sorry you're having trouble. This problem has been covered a few times before.

#192

Your problem is caused by one of two things:

  1. There is no app/config/production/database.php

OR

  1. For some reason, in certain installs, the app/config/production/database.php isn't recognized (assuming you created one), and instead it seems to be looking for the database.php in app/config (without the environmental sub-directory). If you move app/config/production/database.php to app/config/database.php and try it again, it should work.

@firozhaneef
Copy link
Author

I have already installed mysql, created a database name as 'snipeit_laravel', edited the database.php file and change the username and password with mysql username and password. I had successfully installed snipe-it once, but i was getting 'unhandled exception error, while i was trying to access through webbrowser. I hadn't specify any complete url address in the config file at the time of installation. So i removed that directory and setup files completly from apache, i created another folder as snipe-it-fta.com and copied all the snipe-it files to this directory. I have created database again and run the setup, then it got triggered this database error.

Snipe: i think, database.php file recognition might be the issue, i changed the database.php file with even wrong parameters, it showed the same error. so some how installer couldn't find the database.php file. let me try as you said, will update you tomorow. because i am from saudi arabia, gonna sleep now.

@technogenus
Copy link

You could also check your apache access_log and error_log (usually in /var/log/httpd), then check the Laravel framework log (app/storage/log) it might provide details on what is not working. This error also happens if your Apache does not have 'execute' permissions on the snipe diretory and/or does not have write permissions in the app/storage directory.

chgrp -R apache /var/www/snipeit/
chmod -R 754 /var/www/snipeit/
chmod -R 774 /var/www/snipeit/app/storage/

@snipe
Copy link
Owner

snipe commented Aug 12, 2014

Pretty sure my solution will fix this for @firozhaneef. It's come up a few times, and moving the DB file almost always works.

@technogenus
Copy link

Moving the database.php file from the environment folder to the config root? Is there anything common about the distro, Apache, PHP or Laravel versions to go on? We can try and reproduce it and isolate the scenario.

In theory... if PHP and Laravel even start execution, it really should be throwing the exception error into app/storage/logs file. If there are NO logs in the app/storage location for a missing database config file, and no unhandled exception error recorded by Laravel we might want to see if this is an issue to ask Laravel about.

firozhaneef, it would be helpful if you could report back on your progress and any errors that appear in the following log files:

/var/log/httpd/access_log
/var/log/httpd/error_log
snipeitDIR/app/storage/logs/ (either apachehandler or cli)

@technogenus
Copy link

Sorry all... its late and i am clearly missing the point here! ;) the error is actually thrown during artisan install - not loading the web app.

Please disregard the above stuff...

but would still like to find out if there is any common distro php or laravel that causes this issue.

@firozhaneef
Copy link
Author

Thanks for your support @snipe and @technogenus. I have successfully installed snipe-it and started using it. I copied database.php to config directory and ran php artisan app:install command. Thats it.

Once i installed snipe-it, i couldn't login to the web interface with registered username and password. So i have manually checked the user details in mysql database and i found that emailid filed was holding only 20 character and my email id's character length was more than 20. So i have edited email id manually, then it rocks..

Once again, thanks for such a wonderful software.

@technogenus
Copy link

Great! glad its working. Which code version did you pull, and did you run php artisan migrate?
You might want to pull the 'develop' branch for full testing... and run php artisan migrate. There are a lot of unhandled exception fixes in this develop version.

In the latest develop versions the database, email column is 255 characters long.

@technogenus
Copy link

Sorry - scratch that! Snipe has already pulled the develop branch into master... the two branches are currently equal so either will have all the same fixes.

@snipe
Copy link
Owner

snipe commented Aug 13, 2014

Yes, that is a true statement :(

@firozhaneef
Copy link
Author

I have seen supplier list in online demo of snipe-it. but i couldn't find this feature with what i have installed in my pc. I am using snipe-it-v.0.3.6-alpha.

@snipe
Copy link
Owner

snipe commented Aug 13, 2014

Do you maybe mean manufacturer? 

@technogenus
Copy link

In the current version (0.4.3) supplier is available in the asset create screen, manufacturer is also available, but in the asset models create screen.

image

@firozhaneef
Copy link
Author

I am using snipe-it-v.0.3.6-alpha. i have downloaded this 3 days ago from the snipe-it website. Where i can find the lastest virsion 0.4.3?

I have seen manufacturer list but not suppliers.

Let me ask you about one more feature that is asset tracking history. ex: to know who all were used a particular asset before. Do you have any plan to implement this feature?

screenshot from 2014-08-13 13 26 42

@firozhaneef
Copy link
Author

Sorry. Please ignore my question regarding the asset history. This feature is already available with snipe-it. Great Job.

@firozhaneef
Copy link
Author

Can you please advice me that where i can find the lastest version 0.4.3?

@snipe
Copy link
Owner

snipe commented Aug 13, 2014

@firozhaneef the latest version of the software is available on the master or develop branch. It hasn't been settled into a formal release yet, but that code is the most recent.

@firozhaneef
Copy link
Author

Do you have any plan to import users from ldap directory or ldap synchronization?

@snipe
Copy link
Owner

snipe commented Aug 13, 2014

That is on the roadmap, yes. There is currently a python script that handles importing from AD, which is linked to in the readme. (We didn't create it, but it was graciously shared with us by the creator, who is also a Snipe IT user)

@firozhaneef
Copy link
Author

Thanks @snipe. When we can expect the version 1.0?
The password filed is mandatory for all users, while we are creating the users. Basically 1 or 2 guys (admins) will only login into the web interface and allocate assets for users. So what's the point of view that we assign password for all the employees?

@snipe
Copy link
Owner

snipe commented Aug 13, 2014

Hah - I think we have to get out of alpha before we worry about 1.0. It's pretty stable tho, and nothing we do would be destructive, so it's a lower risk alpha/beta situation.

The user can login and see what assets they have assigned to them, and can also (in the future) request assets that have been marked as requestable (for example, test devices). We will likely provide the option to have users that are not "real" users in the future tho, as that's a requested feature by several people.

@firozhaneef
Copy link
Author

@snipe i am really happy with the features which Snipe IT currently offers. I was little curious about 1.0 release. That's why i asked.

The feature, as you said, any user can login into the system and request for available resources, is really great.

Let me download and test the master 0.4.3 and will get back to you.

@gauthamrajd
Copy link

Hi i installed snipe-it software in windows 2008 server and iam running the application in local environment but when i type localhost:8080 i receive he following error do no what it is and how to proceed please help me iam new to this

error message
error in exceptional handler :The stream or file "C:\inetpub\wwwroot\snipe-it\app\storage/logs/log-cgi-fcgi-2014-09-23.txt" could not be opened: failed to open stream: Permission denied in C:\inetpub\wwwroot\snipe-it\vendor\monolog\monolog\src\Monolog\Handler\StreamHandler.php:77

@snipe
Copy link
Owner

snipe commented Sep 23, 2014

Sounds like your storage directory and sub-directories is not writeable by the web server. (Also, you should really create your own issue instead of threadjacking other people's. They get emailed when people reply to this, and your problem has nothing to do with their issues.)

@YCYee912
Copy link

YCYee912 commented Feb 3, 2015

Hi guyz, I am also encountering some similar problem here..
error on snipe it
How may i solve this error?

@snipe
Copy link
Owner

snipe commented Feb 3, 2015

@YCYee912 Did you actually run the php composer.phar install command per the installation instructions?

(Please open a new issue next time, as this issue was closed and isn't related to your current issue.)

@imie
Copy link

imie commented Sep 21, 2015

Hi, i got below problem. tried a few things but same error.

snipeit]# php artisan app:install --env=production
PHP Warning: require(/var/www/html/snipeit/bootstrap../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/snipeit/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/var/www/html/snipeit/bootstrap../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/snipeit/bootstrap/autoload.php on line 17

@imie
Copy link

imie commented Sep 21, 2015

html]# php composer.phar install --no-dev --prefer-source
Loading composer repositories with package information
Installing dependencies from lock file

  • Installing symfony/event-dispatcher (2.8.x-dev e79162f)
    Cloning e79162fa079bb559ddad17c58cf8b7ecbaffd9b6
  • Installing guzzle/guzzle (dev-master b3f5050)
    Cloning b3f5050cb6270c7a728a0b74ac2de50a262b3e02
  • Installing aws/aws-sdk-php (2.8.x-dev 92642ca)
    Cloning 92642ca4906e6681a1301971cf41500d7c68581c
  • Installing symfony/finder (2.5.x-dev e527ebf)
    Cloning e527ebf47ff912a45e148b7d0b107b80ec0b3cc2
  • Installing symfony/var-dumper (2.8.x-dev 937f203)
    Cloning 937f203533edfad9d9ca64d199fcecb9b9d81f3c
  • Installing psr/log (dev-master 9e45edc)
    Cloning 9e45edca52cc9c954680072c93e621f8b71fab26
  • Installing maximebf/debugbar (dev-master ab12b6f)
    Cloning ab12b6f57dd33b1fffa875046fd17c34d88388b9
  • Installing symfony/translation (2.5.x-dev 165b534)
    Cloning 165b5348cd20f8c4b2fcf1097c9c8300d1093b90
  • Installing symfony/security-core (2.5.x-dev 3a27d7b)
    Cloning 3a27d7b34ee62cb0fdf5ad970e7777912ef4722f
  • Installing symfony/routing (2.5.x-dev 46142c3)
    Cloning 46142c34ea830f47429df6e15faec3a33292d618
  • Installing symfony/process (2.5.x-dev 00a1308)
    Cloning 00a1308e8b5aec5eba7c8f1708426a78f929be8c
  • Installing symfony/http-foundation (2.5.x-dev 08e7838)
    Cloning 08e783861dd9579bac4092814bbfb0cae6666b65
  • Installing symfony/debug (2.5.x-dev ed30195)
    Cloning ed3019589cdadf32c521d1e181f9d72955645c67
  • Installing symfony/http-kernel (2.5.x-dev 3165238)
    Cloning 31652385d94eafc2103a98435d6d5bd7eea61736
  • Installing symfony/dom-crawler (2.5.x-dev 3860edc)
    Cloning 3860edcf7ff7e173cfe2151f0d425e610e77cc35
  • Installing symfony/css-selector (2.5.x-dev d45b306)
    Cloning d45b306421462295e76b94bcf76b963867450327
  • Installing symfony/console (2.5.x-dev a43e750)
    Cloning a43e750b4c74f3bdfca77c79c343033d35a6cd6e
  • Installing symfony/browser-kit (2.5.x-dev b2b78b8)
    Cloning b2b78b850a32251cbbd9915ab61453302e7ecd72
  • Installing swiftmailer/swiftmailer (5.x-dev 6522539)
    Cloning 6522539daf0a7bdada1cc2dccb7ec37dc0712136
  • Installing stack/builder (dev-master 14afc80)
    Cloning 14afc80a5bd9dc160470e3131b697f7d0c070729
  • Installing predis/predis (0.8.x-dev 192dfd6)
    Cloning 192dfd61e54c3d32c9526bba03365fff818e17e4
  • Installing phpseclib/phpseclib (0.3.10)
    Cloning d15bba1edcc7c89e09cc74c5d961317a8b947bf4
  • Installing patchwork/utf8 (dev-master 927caed)
    Cloning 927caedc65ec4f139e9d43fd2589a19a336babc3
  • Installing nesbot/carbon (1.17.0)
    Cloning a1dd1ad9abfc8b3c4d8768068e6c71d293424e86
  • Installing monolog/monolog (1.17.1)
    Cloning 0524c87587ab85bc4c2d6f5b41253ccb930a5422
  • Installing nikic/php-parser (0.9.x-dev ef70767)
    Cloning ef70767475434bdb3615b43c327e2cae17ef12eb
  • Installing jeremeamia/superclosure (1.0.x-dev 4d89ca7)
    Cloning 4d89ca74994feab128ea46d5b3add92e6cb84554
  • Installing ircmaxell/password-compat (1.0.x-dev 9b99377)
    Cloning 9b99377557a33a4129c9194e60a97a685fab21e0
  • Installing filp/whoops (1.1.7)
    Cloning 72538eeb70bbfb11964412a3d098d109efd012f7
  • Installing d11wtq/boris (v1.0.8)
    Cloning 125dd4e5752639af7678a22ea597115646d89c6e
  • Installing symfony/filesystem (2.8.x-dev 287fc0b)
    Cloning 287fc0b1dcb11ff729eeefc20441c08eaf628f29
  • Installing classpreloader/classpreloader (1.0.2)
    Cloning 2c9f3bcbab329570c57339895bd11b5dd3b00877
  • Installing laravel/framework (v4.2.17)
    Cloning 3359de6d6cd322e8a1b251c2f8d9dd42a3e4e232
  • Installing barryvdh/laravel-debugbar (1.8.x-dev 8833c88)
    Cloning 8833c88c40f840de9bfaf71247ffdfb341c0d390
  • Installing cartalyst/sentry (v2.1.5)
    Cloning 0ae4158353e41cc4061631c86c1cddd67c1f23be
  • Installing chumper/datatable (2.3)
    Cloning cff842783f3f4af60c2be295435b2bd812510ef5
  • Installing chumper/zipper (0.5.1)
    Cloning d1ab536b4de2c313cd1c28ea01f5bcefbad33610
  • Installing doctrine/lexer (dev-master 83893c5)
    Cloning 83893c552fd2045dd78aef794c31e694c37c0b8c
  • Installing doctrine/annotations (dev-master f25c8aa)
    Cloning f25c8aab83e0c3e976fd7d19875f198ccf2f7535
  • Installing doctrine/cache (dev-master dd47003)
    Cloning dd47003641aa5425820c0ec8a6f4a85e7412ffcd
  • Installing doctrine/collections (dev-master 866e100)
    Cloning 866e100a425b8b73d15393fd081c6bf067f05bf9
  • Installing doctrine/inflector (dev-master 3a422c7)
    Cloning 3a422c73f7bc556d39571f436b61fd58ccae0eb0
  • Installing doctrine/common (dev-master 9f35e74)
    Cloning 9f35e74fcbe9011b660e0b423e98c83b7a8699c0
  • Installing doctrine/dbal (v2.4.2)
    Cloning fec965d330c958e175c39e61c3f6751955af32d0
  • Installing erusev/parsedown (dev-master fa005fd)
    Cloning fa005fdb954330ae6dccb3bb59481da0172d397e
  • Installing fideloper/proxy (2.1.1)
    Cloning a0ec0f35c82dceecc0d8975f29e6e8e85acbd419
  • Installing react/promise (v2.2.1)
    Cloning 3b6fca09c7d56321057fa8867c8dbe1abf648627
  • Installing guzzlehttp/streams (dev-master d1f8a6c)
    Cloning d1f8a6c55f0f753cfd6f6755856473eb02cedb19
  • Installing guzzlehttp/ringphp (dev-master 9465032)
    Cloning 9465032ac5d6beaa55f10923403e6e1c36018d9c
  • Installing psr/http-message (dev-master 85d6369)
    Cloning 85d63699f0dbedb190bbd4b0d2b9dc707ea4c298
  • Installing guzzlehttp/psr7 (1.2.0)
    Cloning 4ef919b0cf3b1989523138b60163bbcb7ba1ff7e
  • Installing intervention/image (dev-master 44c9a6b)
    Cloning 44c9a6bb292e50cf8a1e4b5030c7954c2709c089
  • Installing league/csv (dev-master 640f57a)
    Cloning 640f57af7abb41d51673cd860041979623cee423
  • Installing guzzlehttp/guzzle (5.3.0)
    Cloning f3c8c22471cb55475105c14769644a49c3262b93
  • Installing maknz/slack (dev-master c8ed3e4)
    Cloning c8ed3e4f919358af43516e7ab8d7fa39d3d2f736
  • Installing aws/aws-sdk-php-laravel (1.0.x-dev ce9a9b5)
    Cloning ce9a9b5144d16c9bebda23f41c2dfc7f8da38471
  • Installing schickling/backup (0.6.0)
    Cloning 5243dc1d9b11390e1eb58202fd07dc3829b1bbe0
  • Installing symfony/config (2.8.x-dev a1e8e51)
    Cloning a1e8e51ed2d591bb1827d04fd1d320cd4f03e5fe
  • Installing symfony/stopwatch (2.8.x-dev 9eb95ce)
    Cloning 9eb95ce869cf480c0dc3a1891ae70037d50b43ce
  • Installing symfony/yaml (2.8.x-dev d196cb1)
    Cloning d196cb1ac36901bde7d7fbed74ee31fdb85fd119
  • Installing tecnickcom/tc-lib-color (dev-master 3e1268d)
    Cloning 3e1268d4cc95f55bbe81eac5507c02dccafcb370
  • Installing tecnickcom/tc-lib-barcode (dev-master 3d76d63)
    Cloning 3d76d63b8a622a67664ec60a13d9c33189721784

Generating autoload files
html]# php artisan app:install --env=production

PHP Warning: require(/var/www/html/bootstrap../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/var/www/html/bootstrap../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/bootstrap/autoload.php on line 17

@snipe
Copy link
Owner

snipe commented Sep 21, 2015

The only thing I can suggest is that you delete your composer.lock file and run php composer.phar update.

Also, next time please create a new issue, as your issue is unrelated to the original issue in this ticket.

@imie
Copy link

imie commented Sep 21, 2015

owh, thanks... i will create new ticket.

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

6 participants