Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6831253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:42:57+00:00 2026-05-26T22:42:57+00:00

I am working with cross-domain AJAX in jquery, using a local forwarding script in

  • 0

I am working with cross-domain AJAX in jquery, using a local forwarding script in the middle, and I need to pass Basic Authentication information through to the second domain.
In PHP, I know I have access to $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] variables which are simple plaintext, so my forwarding script can use this information with no difficulty.

For reasons beyond my control, though, I have to perform this task with Perl CGI. I know there is $ENV{REMOTE_USER}, but I can not for the life of me figure out how to find the password. I’ve tried $ENV{HTTP_AUTHORIZATION} but that always comes out blank.

How, in Perl, can I read the Basic Authentication password? Or, at least, is there a way for my CGI to directly read the Authorization header so I can base64-decode and split the string myself?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:42:58+00:00Added an answer on May 26, 2026 at 10:42 pm

    Check out this article: http://www.besthostratings.com/articles/http-auth-php-cgi.html .

    It uses ModReWrite to write the Http Authorization header to an environment variable. You can then access and decode this in your CGI script.

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    </IfModule>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making cross-domain Ajax calls using the latest version of jQuery 1.7.1. with
I'm trying to get a jsonp callback working using jquery within a greasemonkey script.
I am attempting to write a user script that makes a cross domain AJAX
I'm trying to get a tracking script working that uses AJAX via JQuery. This
I'm trying to use the dynamic script tag for cross-domain ajax, since I can't
EDIT : At first I thought it wasn't working cross domain at all, now
I have been working on a JQuery script that posts JSON to my asp.net
URLRequest not working in Cross domain in AS3? <?xml version=1.0 encoding=utf-8?> <mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=absolute
I have do post some information in cross domain . And i am achieving
I'm working on a Facebook iFrame App and i need to use ajax request

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.