Can you show those routes?
Did you create a password on your local server and set the same value in the production database? Does the local server and the production server have the same key? (app.php)
stefandroog said:
Can you show those routes?
Did you create a password on your local server and set the same value in the production database? Does the local server and the production server have the same key? (app.php)
ah! damn it...I totally forgot about key in app.php...I didn't even generate a key yet...it's still
'key' => 'YourSecretKey!!!',
is this the problem?
Edit:
Weird...I went app.php and clear out that 'YourSecretKEY!!' and went to command line and used php artisan key:generate which it generated and said success BUT when I go into the app.php file the key is '' I ended up typing in the keys myself a 32character keys. and uploaded into the server. Still no luck :(
By default you should use 'email' instead of 'username' or did you change that?
How do you authenticate your user? Can you show that part of the controller as well?
stefandroog said:
By default you should use 'email' instead of 'username' or did you change that?
How do you authenticate your user? Can you show that part of the controller as well?
and yup I did change the basic auth filter to 'username'
oops I thought for basic authenticate you don't need to do anything in the controller. Am I missing something here? I was watching videos about basic auth and seems it works locally even without anything in controller though.
Did you cleared the cookies and regenerated the password for the user in db after changed the key?
Edit: Also try look into the request server params. You can access the given user trough the app('request')->getUser()
method and password with ->getPassword()
. You can look at $_SERVER
or app('request')->server
for PHP_AUTH_USER
and PHP_AUTH_PW
. If they are not present it most likely some server/php configuration issue, what I can find this happens if remote auth and safe-mode is enabled (safe-mode is deprecated with php 5.3.x and removed in 5.4).
tlgreg said:
Did you cleared the cookies and regenerated the password for the user in db after changed the key?
Edit: Also try look into the request server params. You can access the given user trough the
app('request')->getUser()
method and password with->getPassword()
. You can look at$_SERVER
orapp('request')->server
forPHP_AUTH_USER
andPHP_AUTH_PW
. If they are not present it most likely some server/php configuration issue, what I can find this happens if remote auth and safe-mode is enabled (safe-mode is deprecated under 5.3.x).
oh I didn't try regenerate the username / password after changed the key. Let me try it in a day or two
hummm...trying to digest the server params you are talking about I am still really new with this kind of stuff...
The process mentioned in the following link helped me (might help you guys too if the core of the problem is same) - http://codetheory.in/fixing-laravel-basic-auth-failure/
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community