index.php/auth/signin somehow not mandatory
Hi,
I am installing snipe-it asset management v1.1 on a Debian/apache2 server. (not running the v1.2.6.1 yet because I need to migrate an old v1.1 machine to a new environment after which I want to upgrade) I almost got it working except.... When I logout of the site it still shows me the contents of the asset database. It also shows the "create asset" button and allows me to redirect to the asset form. When trying to enter a new asset or "checkin/out" an existing asset it crashes...
I can force it to go to /auth/signin (adding it to the URL manually) but somehow it is not mandatory for viewing the assets and it doesn't force a redirect to the signin page.
in app/storage/logs it states:
[2015-03-26 15:51:30] acceptance.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:146 Stack trace: #0 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1021): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request)) #1 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Routing/Router.php(989): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request)) #2 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Routing/Router.php(968): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #3 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(738): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #4 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(708): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request)) #5 /home/asset/acceptance/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true) #6 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Http/FrameGuard.php(38): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true) #7 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Http\FrameGuard->handle(Object(Illuminate\Http\Request), 1, true) #8 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true) #9 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true) #10 /home/asset/acceptance/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true) #11 /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(606): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request)) #12 /home/asset/acceptance/public/index.php(49): Illuminate\Foundation\Application->run() #13 {main} [] []
I can't make sense of it :-) ... help?
v1.1 is pretty far behind. My recommendation would be to upgrade and see if that fixes your issue.
(Also, that url looks wrong. There is no index.php/auth/signin. Maybe that's what's causing your issue?)
Hi snipe :-) Thanks for the quick response. Would you recommend upgrading before migration between servers? I can't upgrade the old server because it is a shared environment with an outdated php version Is the DB schema the same between versions?
You should just be able to copy your files and database over to the new server, grab the new version, and run the database migrations to bring everything up to date. (Make sure you run all of the upgrade commands to grab the new composer libraries as well)
k :-) did whta you said. After copying the DB and teh files the v1.1 worked like a charm (dunno what went wrong the first time)
But now I downloaded v1.2.6.1 expanded it and copied the files into the old directory. When I follow the README.md it says:
Important Notes on Updating
Whenever you pull down a new version from master or develop, when you grab the latest official release, make sure to run the following commands via command line:
php composer.phar dump-autoload
php artisan migrate
So I do:
asset@vdvl3:~/acceptance$ asset@vdvl3:~/acceptance$ php composer.phar dump-autoload Generating autoload files asset@vdvl3:~/acceptance$ php artisan migrate PHP Fatal error: Class 'Dinesh\Barcode\BarcodeServiceProvider' not found in /home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 158 {"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class 'Dinesh\Barcode\BarcodeServiceProvider' not found","file":"/home/asset/acceptance/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php","line":158}}
And the website crashes again
for now I reverted back to v1.1 ... What steps do I need to take to properly upgrade from v1.1 to v1.2.6.1 ?
@JaapSch take a look at this page http://snipeitapp.com/documentation/upgrading/ it should help
Thanks for all the help :-) I executed the upgrade process from scratch... now it works ... most likely my inexperience that corrupted the upgrade :-D