close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

HTTP authentication with PHP and Microsoft IIS

Thread began 3/01/2010 11:33 am by Rune Brynestad | Last modified 3/03/2010 3:10 am by Rune Brynestad | 2253 views | 4 replies |

Rune Brynestad

HTTP authentication with PHP and Microsoft IIS

I'm trying implement a single sign on authentication system in PHP for an Intranet. I'm checking for the existence of the $_SERVER['REMOTE_USER'] variable, and PHP is populating the variable correctly (SSF\c890rbr in this case). I also want to use this variable to filter my recordset and then populate some form fields from a database. This is not working as expected. Please look at it. I'm attaching my sample form and database.

Regards
Rune

Attached Files
Test.zip
Sign in to reply to this post

Jason ByrnesWebAssist

My server has the remote_user variabel disabled so can not test this.


try adding the following code inside the body:

php:
the recordset SQL is: <?php echo($query_rs); ?><br />





this write the query being used to give some more information.

Sign in to reply to this post

Rune Brynestad

Done. I'm attaching a screenshot of my page.

As you can see there is a difference between the variable displaying on the page and the variable that should filter my recordset.

The $_SERVER['REMOTE_USER'] variable displays correctly here: SSF\c890rbr

the recordset SQL is: SELECT * FROM users WHERE Username = 'SSF\\\\c890rbr'

So where do the 3 extra \\\ come from ?

Thanks again for looking into this.

Regards
Rune

Sign in to reply to this post

Jason ByrnesWebAssist

try changing line 36:

php:
$colname_rs = (get_magic_quotes_gpc()) ? $_SERVER['REMOTE_USER'] : addslashes($_SERVER['REMOTE_USER']);




to:

php:
$colname_rs = (get_magic_quotes_gpc()) ? $_SERVER['REMOTE_USER'] : $_SERVER['REMOTE_USER'];
Sign in to reply to this post

Rune Brynestad

Works perfect now.

Thanks again for your support.

Regards
Rune

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...