0

In local computer i made php script that prompts users for their username and password through http basic auth. When i get username and password i use them to connect an api server. However on prod server http basic auth is not working because php server api compiled as FPM. Since PHP_AUTH_USER does not work with FPM, i need an idea to alter that. Recompiling PHP as apache mod, i mean server api: apache2handler is an idea but i have afraid to do it on a prod server.

orko
  • 117
  • 2
  • 11

1 Answers1

0

See answer here: PHP_AUTH_USER not set?

in particular my last comment for PHP-FPM (checked and working with Symfony)

For an example in PHP see this:

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/ServerBag.php#L47

Community
  • 1
  • 1
thePanz
  • 349
  • 4
  • 6