apache_authentication failed #481

Open
opened 2026-10-05 00:00:36 +02:00 by adam · 3 comments
Owner

Hi,

I tried to configure apache based authentication.
System: Ubuntu 16.04, Apache 2.4.18, php 5.6.24-1, piwigo 2.8.2

Tracking down I realized that the user id shown in the PHP_AUTH_USER server variable, and both the REMOTE_USER and the REDIRECT_REMOTE_USER isn't exists.
After I changed the line 50 in the ./include/user.inc.php from

foreach (array('REMOTE_USER', 'REDIRECT_REMOTE_USER') as $server_key)

to

foreach (array('PHP_AUTH_USER', 'REMOTE_USER', 'REDIRECT_REMOTE_USER') as $server_key)

It started to work.
Can you please correct it in the code?

Thank you,
Zoltan

Hi, I tried to configure apache based authentication. System: Ubuntu 16.04, Apache 2.4.18, php 5.6.24-1, piwigo 2.8.2 Tracking down I realized that the user id shown in the PHP_AUTH_USER server variable, and both the REMOTE_USER and the REDIRECT_REMOTE_USER isn't exists. After I changed the line 50 in the ./include/user.inc.php from foreach (array('REMOTE_USER', 'REDIRECT_REMOTE_USER') as $server_key) to foreach (array('PHP_AUTH_USER', 'REMOTE_USER', 'REDIRECT_REMOTE_USER') as $server_key) It started to work. Can you please correct it in the code? Thank you, Zoltan <!-- github-sync-id:170613887 -->
Author
Owner

Hi @sufzoli considering you have found a way to fix this bug, the best solution would be that you create a pull-request :-) Do you think you can do that?

Hi @sufzoli considering you have found a way to fix this bug, the best solution would be that you create a pull-request :-) Do you think you can do that? <!-- github-comment-id:239127012 -->
Author
Owner

Done. I hope, I didn't make a mistake as this is my first pull-request. :-)

Done. I hope, I didn't make a mistake as this is my first pull-request. :-) <!-- github-comment-id:239145806 -->
Author
Owner

Would be nice if this gets implemented.
Now I need to update this file manually after each update.
(Piwigo 2.10.1 Running on Ubuntu 18.04 with nginx 1.14, PHP 7.2.24 in FPM/FastCGI mode)

Would be nice if this gets implemented. Now I need to update this file manually after each update. (Piwigo 2.10.1 Running on Ubuntu 18.04 with nginx 1.14, PHP 7.2.24 in FPM/FastCGI mode) <!-- github-comment-id:553276789 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#481