php-ps-info: Can't login - 401 unauthorized

Hello there, I was able to use your script on my staging environment, while on production is not working at all, as it keeps asking for credentials, while I’m sure that those are right. Any idea why it is not working? Maybe it is related on the usage of $_SERVER in the checkAuth method? Thanks in advance.

Edit by @PierreRambaud: If the problem occurs, comment this line https://github.com/PrestaShop/php-ps-info/blob/master/phppsinfo.php#L499

$info = new PhpPsInfo();
// $info->checkAuth();

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

The HTTP_AUTHORIZATION header removed by apache Two ways to fix.

  1. Add to .htaccess RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  2. Or add to apache config (may be virtualhost config) SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

@Gipielle You can comment this line: https://github.com/PrestaShop/php-ps-info/blob/master/phppsinfo.php#L499 I will update the issue description šŸ˜‰