Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unauthorized response, with php 7.1 #72

Closed
jerfeson opened this issue Jul 3, 2018 · 1 comment
Closed

unauthorized response, with php 7.1 #72

jerfeson opened this issue Jul 3, 2018 · 1 comment

Comments

@jerfeson
Copy link

jerfeson commented Jul 3, 2018

Always getting an unauthorized response, with php 7.1.18, on the shared hostgator server, everything works perfectly locally (php7.2 OR 7.1.18). Can someone help me ?

$app->add(new Tuupola\Middleware\HttpBasicAuthentication([
    "path" => "/v1",
    "secure" => false,
    "relaxed" => ["localhost"],
    "users" => [
        "teste" => 'teste',
    ]
]));

@tuupola
Copy link
Owner

tuupola commented Aug 14, 2018

Make sure the authentication header is passed to PHP. For example if the hosting company uses FastCGI some extra steps are required. You can do for example print_r($_SERVER) somewhere in your code and look for the headers there.

See also #74, #65 and #8 which are similar.

@tuupola tuupola closed this as completed Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants