toyama

Member
Jun 17, 2011
21
1
53
Hello,

I have the issue on getting PHP_AUTH_* from $ _ SERVER array object when migrated from EA3 to EA4.
I attempted the following settings in .htaccess but could not solve the problem.

CGIPassAuth On
or

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello,

Can you let us know the full steps you are using so we can attempt to reproduce the issue? Also, what PHP handler are you using for the account you are testing this with (e.g. suPHP, DSO, PHP-FPM)?

Thank you.
 

toyama

Member
Jun 17, 2011
21
1
53
Hello,

Thanks for the reply.

I select suPHP for PHP Handler.
I migrated from EA3(Apache2.2 + suPHP + PHP5.6) to EA4(Apache2.4 + suPHP + PHP5.6).

Can not use PHP_AUTH_ * when using PHP Handler with suPHP on EA4?


The problem was avoided by modifying the code that used PHP_AUTH_* and .htaccess.

Add to .htaccess
RewriteEngine on
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
Changed php code to use REDIRECT_REMOTE_USER from PHP_AUTH_USER and PHP_AUTH_PW.


Thank you.
 
  • Like
Reactions: cPanelMichael