I have installed Multi Auth following instructions by ollieread at https://github.com/ollieread/multiauth, but i'm missing some point here.
I got this error when running my app before replacing the configuration for auth (config/auth.php):
ErrorException
Missing argument 1 for Illuminate\Auth\AuthManager::createDriver(), called in /private/var/www/portal-varejo/www/vendor/laravel/framework/src/Illuminate/Support/Manager.php on line 81 and defined
Im pretty sure that whats missing is this (from documentation):
Custom Auth Drivers
At this current moment in time, custom Auth drivers written for the base Auth class will not >work. I'm currently looking into this particular issue but for the meantime, you can work >around this by changing your closure to return an instance of Ollieread\Multiauth\Guard >instead of the default.
How can i do that? What closure i'm supposed to change?
Running Laravel 4.1 here.
You need to comment out 'Illuminate\Auth\AuthServiceProvider' and 'Illuminate\Auth\Reminders\ReminderServiceProvider' from app/config/app.php.
Related
Since I upgrade to the new spartacus version (1.5) I've seen this bug in the console. It's came from SiteContextComponentService.getInjectedService.
I have not implemented nor used yet this service. How I can fix this bug? Cause I strongly believe is the origin of other little problems in my develop environment.
If you use 'CMSSiteContextComponent' component type (flextype?), then it should come with the context cms component data from the backend. Please check if the response contains it.
So the origin of the error was that in the GET /pages request I was not receiving the context attribute neither in the LanguageComponent nor the CurrencyComponent.
I was using prestashop on hosting with no problem.
Now I started my home web server and I'm trying to get it working.
I tried many different prestashop versions and reinstalled them x times..
All the time problem is that, I can Access front panel, but not the backend panel..
All the time it shows Http 500 ERROR : Server can't Handle this request.
Now I enabled debugging and it shows me error:
Fatal error: Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore::viewAccess($disable = false) in C:\xampp\htdocs\Shop\controllers\admin\AdminLoginController.php on line 27
And Line
class AdminLoginControllerCore extends AdminController{
I can't understand why this is happening, becouse I haven't edited and changed any file or folder.
It happens because you have to implement a method in a child class with all parameters of a parent class method. So in your parent class viewAccess has a parameter $disable=false and you need to have it in your child viewAccess() declaration. Just put that parameter in the declaration public function viewAccess($disable=false) and you even need not use it inside. And why it was not showing on the hosting but show in a local machine it is sooner in due to different PHP versions on the servers. Because in different versions it has different error levels.
The way to fix this is simple:
go to ROOT/controllers\admin\AdminLoginController.php
al line 153 you’ll have to change
public function viewAccess() to public function viewAccess($disable = false).
I had that issue with a fresh installation of PS 1.7 yesterday but did'nt come out of it. Today, apparently the same one with PS 1.6.18, thought I was expecting it would'nt, but it seems that PS can't stand PHP 7.2.4, no matter which PS version it is (of course I should have guessed that a previous version would'nt make it better than a recent one ...). Some PHP warnings might have turned into fatal errors now. The fact is, when I went into controllers/admin/adminLoginController on line 153 and typed public function viewAccess($disable = false) instead of public function viewAccess() the blank screen went away and my back-office was there (with some remaining warnings ...). Those files would'nt have to be overwritten to allow upgrade, but anyway 1.6.18 is the last upgrade of 1.6 series... Hope it can help.
I'm using the autofac web api 2.2 integration (version 3.4) and I'm debugging one of my controllers. It seems like the request lifetime scope is always null when I try the following from any point where I'd expect there to be an active request:
var x = (AutofacWebApiDependencyResolver) GlobalConfiguration.Configuration.DependencyResolver;
x.GetRequestLifetimeScope(); // always null
Is this expected behavior? I'm a bit confused because it looks like all of my components are resolved at 'root' which, according to the documentation is bad. I was expecting it to automatically put it into a request scope when I register using InstancePerRequest(). It seems like:
AutofacWebApiDependencyResolver.BeginScope()
never happens.
I could post more sample code, but I've reproduced it following the quick start guide with very basic controllers, so I suspect it's more of a flaw in my logic above and was hoping someone could point it out. Thanks!
I had the same problem and my issue was that I copied my autofac configuration from a MVC project and was registering my dependencies with InstancePerRequest. When I changed that to InstancePerDependency instead it solved the problem and GetRequestLifetimeScope was working.
builder.RegisterType<X>().As<IX>().InstancePerDependency();
In action method, you can get the request scope by
var scope = Request.GetDependencyScope();
My laravel project has two login system.
1) Using user_name and Password
2) Using secret code
my 1st login system work properly. because auth.model has 'User' model.
so I use 'Config::set' in 'tempSing' method to obtain 2nd login as bellow.
Config::set('auth.model', 'TempUser')
Config::set('auth.table', 'temp_user')
After that code I use bellow code
$user= TempUser::where('secret_code','=',Input::get('code'))->first();
Auth::login($user,true);
if(Auth::check())
return Redirect::route('getTemp');
then that code work properly and redirect to the 'getTemp' and after routing it make 'temp.php'. but their include
if(Auth::check())
so my problem is above logic not become true. that problem is occurred when using 'Config::set' but I Configured 'auth.model' and 'auth.table' manualy in 'auth.php' not happen any error. Please help me.
I would assume Laravel initializes the Auth service once when the application is started, so later edits to configuration don't affect it anymore. A solution would be to initialize an instance yourself, and use that.
I have just finished setting up an HMVC CodeIgniter following the steps here.
I am now trying to create a module "api" which I wish to use Phil Sturgeon's REST library.
It states here that I need to extend the MX_Controller rather than the CI_Controller and I did.
My initial setup was like this
application
--modules
----api
------config
------controller
------libraries
I kept getting an error with loading Rest_Controller so I have tried moving the REST_Controller and Format libraries to application/libraries that seemed to fix the loading issue but now i am getting the error below whenever i try to access it via http://example.com/codeigniter/index.php/api/example/user/id/1/format/json
"An Error Was Encountered
Unable to load the requested class: security"
I am expecting for the output to be "{"id":1,"name":"Some Guy","email":"example1#example.com","fact":"Loves swimming"}"
What am I missing? Would it be possible to keep the REST_Controller and Format libraries under the api module? If so, how?
Source
Open Rest_Controller.php go to line 173 and change the following code
$this->load->library('security');
to
$this->load->helper('security');
EDIT:
To have the REST_Controller and Format libraries under the api module.
Move the REST_Controller to api/controllers/REST_Controller.php and Format to api/libraries/Format.php