I tried everything on the internet on error NotFoundHttpException in RouteCollection.php line 161 but it seemed can't to work. I have installed Laravel 5.2 on my computer and XAMPP too. I currently working on project and stuck on phpmyadmin. First, i use php artisan serve and migrate the table to my database and i open http://localhost:8000/phpmyadmin/ and it seemed work. After some work(progress on project like seeding and php), i cant open phpmyadmin on my browser and it says NotFoundHttpException in RouteCollection.php line 161.It works fine when i stop the php artisan serve but when i use it again then it shows error.Can someone tell me how to solve this so i can access my phpmyadmin on browser?
have two different url i mean port for php artisan serve
and local server
some thing like this,
http://localhost/phpmyadmin/
http://localhost:8000/
don't access phpmyadmin from php artisan serve's server
In Implicit call
you should define the route only once, Let me know if it works.
Route::controller('collection','CollectionController');
so now in url collection/home if being parsed then laravel will automatically call getHome() function
Related
I have a running app written on Laravel 5.7. I tried to change the record in composer.json to match "5.8.*" and ran composer update. On my local (win10/WAMP) machine it went fine, but on the staging server (Debian 9/nginx) the update command changed the vendor contents and failed at the end.
Since then anything I do with the app on the server I get this error and I can't find any information anywhere.
Call to undefined method Illuminate\Routing\RouteFileRegistrar::get()
And this is the line that fails:
$this->get('login', 'Auth\LoginController#showLoginForm')->name('login');
Thanks in advance!
remove "$this" from your routes and use "Route::"
It is a problem with the routes. Mainly, you get this problem when you are using routes with resource or resources. Make sure you do not have any problem in routes by using the command:
#php artisan route:list
If you are getting any problem while route listing please fix it.
I solved this problem in Laravel 5.8 by fixing routes.
Hope this will help.
I have few controllers in my zf2 project which work perfectly in the browser using apache and via command line.
However, I recently installed MongoDb so I can store some data using the driver found in (http://php.net/manual/en/set.mongodb.php)
My issue is, when I try to access the driver via controller + browser, I get the following message error in my apache logs :
PHP Fatal error: Class 'MongoDb\Driver\Manager' not found.
'MongoDb\Driver\Manager' is the namespace for this Driver.
If I execute some other controllers via command line, MongoDb works correctly.
Does anyone know why is this happening? I cannot see the issue :(
Thank you
I found that my php.ini was pointing to mongo.so instead of mongodb.so
That fixed the issue
http://php.net/manual/en/mongodb.installation.manual.php
Thank you for your help
I just moved my app from a AWS EC2 server to another.
I deploy with GitHub, so, everything should be smooth.
a
But I got a lot of issues:
When I try to login with user / Pass, I get:
TokenMismatchException in VerifyCsrfToken.php line 68:
When I try to login with socialite ( Google / FB ) I get:
Socialite: InvalidStateException in AbstractProvider.php Line 200
I manage a plugin https://github.com/proengsoft/laravel-jsvalidation, that I also give error
Off course, in local, everything works fine ( I use Laravel valet )
I can't figure out what is the common point between all those elements.
What I did :
composer install
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artian vendor:publish
composer clear-compiled
php artisan migrate -seed
gulp
copied my old .env to the new server ( it's not automatically deployed )
I also checked my storage/framework/sessions folder had write permission.
EDIT: My guess is there is a problem with sessions, but don't really know what... CRSF Field works with session. Also AbstractProvider issue appears to be a session problem. I tried to change session from file to DB, but with no result.
Any idea why is there so many errors?
I read a lot of cases, but none got my solution.
I solved it changing
APP_ENV=testing
to
APP_ENV=test
in my .env file
One more solution to this problem, hope it helps!
Stupid, but very time consuming!!!
I need to move app in laravel from web server to local sever (I trying on XAMPP). I moved all files, database and in files I changed URI in:
/index.php
<? header("Location: http://localhost/public"); ?>
but I get errors in:
On http://localhost/ I have blank page
On http://localhost/public and every another route I getting error: http://pastebin.com/zUFqS8ET
When I use php artisan or another commands I getting error:
[ErrorException]
Undefined index: HTTP_USER_AGENT
I forgot about somethink?
EDIT:
Ok, I downgrade my PHP to 5.6.* but artisan still not working - same error, what's the problem?
EDIT 2:
Here is logs - problem is in SMF but I don't know why ...
http://pastebin.com/HZQ7CZeg
Sorry, I know this is obvious. But, have you run PHP composer install? And as a basic test you can create an empty laravel project to test your computer's configuration. If it works then you know its something in your project you need to update.
Laravel installation
I am using Laravel 5 on a shared host. I have installed it ok. However on running:
/usr/bin/php55-cli artisan app:name 247
the laravel install broke. I tracked it down to app.php and the new name caused syntax errors. I got it working again by using Linux to do a global replace changing it back from 247 to App.
Does anyone know why? And how can I get artisan to work properly?
Thanks
This is not Laravel nor artisan issue, but plain PHP syntax error.
PHP does not allow variable or class name to start with an integer. Same goes to namespaces. So your error comes from you app name being 247. First letter can not be an integer.