Jump to content

$_SERVER['REMOTE_USER'] - Is Empty during phpinfo.php


Pandee

Recommended Posts

Hello I have the following environment:

- Apache 2

-Ubuntu 18.04

-MySQL

 

My problem is the $_SERVER['REMOTE_USER'] - When I check the phpinfo.php it shows up as empty or "No value". However I did set it on a page like so:

$_SERVER["REMOTE_USER"] = $_SESSION["username"];

During the login event and it is working when printing:

 print "REMOTE_USER: ".$_SERVER["REMOTE_USER"]."\n";

 

Am I setting it incorrectly or perhaps theres a proper way to do it?

 

Many Thanks

 

Link to comment
Share on other sites

Hello!

You see Im trying to link a wiki installation to use an existing database with users already populated. Ive been trying my best to research on getting it work and apparently it needs remote_user to parse a remote login into the wiki. In doing so a user wont need to login twice.

Examples of this is like: https://www.mediawiki.org/wiki/Extension:Auth_remoteuser

Or for doku this: https://www.dokuwiki.org/plugin:authremoteuser

 

Thanks @requinixfor the help

Edited by Pandee
Link to comment
Share on other sites

The REMOTE_USER is a value that is populated for you if the user is set up to be authenticated through your web server. It is not. Nor is it likely what you should be using if you have to work with a database.

You need a custom (potentially) mechanism to authenticate users against your database. That seems to mean using AuthManager.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.