tuupola/slim-basic-auth

godaddy: cannot login

Closed this issue · 4 comments

Hello,

after few tests, I was unable to login, the page was asking for user and pass continuosly
I have var_dumped user and pass on the page, but the values were null

url: http://zaporojandesign.ro/admin

user: root
pass: toor (not t00r)

user: user
pass: passw0rd

my question is, how could I investigate what happens ? I'm using godaddy as hoster and have no https. Maybe I have to tweek some php settings or could .htaccess can be the problem ?

Sounds like GoDaddy is not to be passing Authentication headers. Maybe because they are using FastCGI. Try adding the rewrite rules as suggested in documentation.

RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

In general my best advice is to use hosting company such as Linode. Judging from the amount of questions in StackOverflow and general forums people using Godaddy seem to run into lot of problems.

yes, I plan to swith provider, but have not found a proper solution, I'll check Linode and I'll try to use the option with fastcgi :) this evening!

the solution is to add: RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
to .htaccess, that worked fine.

maybe is a good idea to add a file with specifications for shared hostings !?

RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

This solution worked for me